GETTIMEOFDAY(2) HP Integral PC GETTIMEOFDAY(2) GETTIMEOFDAY(2) HP Integral PC GETTIMEOFDAY(2) GETTIMEOFDAY(2) HP Integral PC GETTIMEOFDAY(2) GETTIMEOFDAY(2) HP Integral PC GETTIMEOFDAY(2) NAME NAME NAME NAME gettimeofday, settimeofday - get/det date and time SYNOPSIS SYNOPSIS SYNOPSIS SYNOPSIS #include gettimeofday(tp,tzp) struct timeval *tp; struct timezone *tzp; settimeofday(tp, tzp) struct timeval *tp; struct timezone *tzp; HP-UX COMPATABILITY HP-UX COMPATABILITY HP-UX COMPATABILITY HP-UX COMPATABILITY Level: HP-UX/RT Origin: UCB DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION Gettimeofday returns the system's current notion of the current Greenwich time and the current time zone. Time returned is expressed relative in seconds and microseconds since midnight January 1, 1970. The structures pointed to by tp and tzp are defined in as: struct timeval{ u_long tv_sec; /* sec since Jan. 1, 1970 */ long tv_usec; /* and microseconds */ }; struct timezone { int tz_minuteswest; /* of Greenwich */ int tz_dsttime; /* daylight savings */ }; The timezone structure indicates the local time zone (measured in minutes of time westward from Greenwich), and a flag that, if nonzero, indicates that Daylight Saving time applies locally during the appropriate part of the year. RETURN VALUE RETURN VALUE RETURN VALUE RETURN VALUE A 0 return value indicates that the call succeeded. A -1 return value indicates an error occurred, and in this case an error code is stored into the global variable errno. ERRORS ERRORS ERRORS ERRORS If an argument address references invalid memory then errno will be set to EFAULT. SEE ALSO SEE ALSO SEE ALSO SEE ALSO Hewlett-Packard - 1 - (printed 12/12/84) Hewlett-Packard - 1 - (printed 12/12/84) Hewlett-Packard - 1 - (printed 12/12/84) Hewlett-Packard - 1 - (printed 12/12/84) GETTIMEOFDAY(2) HP Integral PC GETTIMEOFDAY(2) GETTIMEOFDAY(2) HP Integral PC GETTIMEOFDAY(2) GETTIMEOFDAY(2) HP Integral PC GETTIMEOFDAY(2) GETTIMEOFDAY(2) HP Integral PC GETTIMEOFDAY(2) date(1), ctime(3) Hewlett-Packard - 2 - (printed 12/12/84)