HP-UX Reference (11i v1 00/12) - 2 System Calls (vol 5)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man2/!!!intro.2
________________________________________________________________
___ ___
g
gettimeofday(2) gettimeofday(2)
NAME
gettimeofday - get the date and time
SYNOPSIS
#include <sys/time.h>
int gettimeofday(struct timeval *tp, void *tzp);
DESCRIPTION
The gettimeofday() function obtains the current time, expressed as seconds and microseconds since
00:00 Coordinated Universal Time (UTC), January 1, 1970, and stores 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 application is not a UNIX-conforming application. See the HP-UX EXTEN-
SIONS section for treatment of a non-null pointer for the tzp argument.
RETURN VALUE
The gettimeofday() function returns 0 and no value is reserved to indicate an error. See the HP-UX
EXTENSIONS section for function return values under HP-UX.
ERRORS
No errors are defined. See the HP-UX EXTENSIONS section for error values under HP-UX.
SEE ALSO
ctime(3C), date(1), ftime(2), stime(2), time(2), <sys/time.h>.
CHANGE HISTORY
First released in Issue 4, Version 2.
HP-UX Release 11i: December 2000 − 1 − Section 2−−117
___
___