[ CnUnix ] in KIDS 글 쓴 이(By): terzeron (microkid) 날 짜 (Date): 2005년 8월 11일 목요일 오전 10시 58분 10초 제 목(Title): Re: 계산시간 측정? POSIX에서는 gettimeofday의 최소 해상도를 규정하고 있지 않습니다. POSIX.1이 IEEE Standard 1003.1-1998인데(POSIX 전체는 IEEE Std 1003.n) 2004년판 POSIX.1 문서를 확인해보니 유닉스 매뉴얼의 공통 부분에 해당하는 아주 약간의 설명만 있더군요. The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition Copyright ⓒ 2001-2004 The IEEE and The Open Group, All Rights reserved. -------------------------------------------------------------------------------- NAME gettimeofday - get the date and time SYNOPSIS [XSI] #include <sys/time.h> int gettimeofday(struct timeval *restrict tp, void *restrict tzp); DESCRIPTION The gettimeofday() function shall obtain the current time, expressed as seconds and microseconds since the Epoch, and store it in the timeval structure pointed to by tp. The resolution of the system clock is unspecified. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 이 부분 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If tzp is not a null pointer, the behavior is unspecified. RETURN VALUE The gettimeofday() function shall return 0 and no value shall be reserved to indicate an error. ERRORS No errors are defined. ------------------------------------------------------------------------------ The following sections are informative. EXAMPLES None. APPLICATION USAGE None. RATIONALE None. FUTURE DIRECTIONS None. SEE ALSO ctime(), ftime(), the Base Definitions volume of IEEE Std 1003.1-2001, <sys/time.h> CHANGE HISTORY First released in Issue 4, Version 2. Issue 5 Moved from X/OPEN UNIX extension to BASE. Issue 6 The DESCRIPTION is updated to refer to "seconds since the Epoch" rather than "seconds since 00:00:00 UTC (Coordinated Universal Time), January 1 1970" for consistency with other time functions. The restrict keyword is added to the gettimeofday() prototype for alignment with the ISO/IEC 9899:1999 standard. End of informative text. ------------------------------------------------------------------------------ --- 어떤 성취가, 어떤 조롱이, 또는 어떤 고뇌가 나를 기다리고 있을지 나는 모른다. 나는 아무 것도 모른다. 그러나 나는 아직 과거의 경이로운 기적의 시대가 영원히 과거의 것이 되어 버리지는 않았다는 사실을 굳게 믿고 있다. - Stanislaw Lem - |