[ CnUnix ] in KIDS 글 쓴 이(By): guest (Sungsim) 날 짜 (Date): 1994년08월13일(토) 06시57분56초 KDT 제 목(Title): CPU time check annyung ha se yo? ajik, hangul taja lel jal mot chu suh iru-ke romanji ro ssep ni da. <time.h> header file has type declarations and protocol definitions of functions and structure for cpu time access. for example, clock_t clock(void) time_t time(time_t *tp) double difftime(time_t time2, time_t time1) . 'clock' returns the processor time used by the program since the beginning of execution or -1 if unavailable. 'time' rreturns the currect calendar time or -1 if the time is not available. if you are specially interested in the cpu time in a specific job within your code, then time(time1) ...... ... .. time(time2) time_taken = difftime(time2, time1); |