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 collection 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.


[ Back to top | UNIX-Type APIs | APIs by category ]