#include <sys/time.h>
gettimeofday(tp, tzp) struct timeval *tp; struct timezone *tzp;
settimeofday(tp, tzp) struct timeval *tp; struct timezone *tzp;
The structures pointed to by tp and tzp are defined in <sys/time.h> as:
struct timeval { long tv_sec; /* seconds since Jan. 1, 1970 */ long tv_usec; /* and microseconds */ }; struct timezone { int tz_minuteswest; /* of Greenwich */ int tz_dsttime; /* type of dst correction to apply */ };
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. Note, however, that the tzp argument is ignored on the NeXT computer, which uses the /etc/tzone package instead.
Only the super-user may set the time of day.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97