Time APIs

The Time APIs include two sets of APIs:

Both the System Clock and Software Clock APIs use a timeval structure that is the number of seconds and microseconds since 1 January 1970, 00:00:00 Universal Coordinated Time (UTC).

The System Clock APIs allow you to work with the system clock. The system clock is a system facility that maintains the time of the system. The gettimeofday() and ftime() APIs get the current time from the system clock. The adjtime() and settimeofday() APIs set the system clock. See the Time Management topic for more information about the system clock.

The Software Clock APIs allow you to work with the software clock. The software clock is a system facility that maintains a time that is independent from the system clock. The Qp0zGetTimeofDay() API gets the current time from the software clock. The Qp0zAdjTime() and Qp0zSetTimeofDay() APIs set the software clock. In previous releases, the software clock was the only way to get a UTC time in seconds and microseconds. System components do not base their timestamps on the software clock, but use the system clock instead. The software clock will be removed in a future release and its use is discouraged.


Top | UNIX-Type APIs | APIs by category