Software Clock APIs

The Software Clock APIs are:

Note: These functions use header (include) files from the library QSYSINC, which is optionally installable. Make sure QSYSINC is installed on your system before using any of the functions. See Header Files for UNIX-Type Functions for the file and member name of each header file.

The Software Clock is a system facility that determines the current Universal Coordinated Time (UTC) in seconds and microseconds since 1 January 1970, 00:00:00 (epoch-1970). The current time is determined by keeping an internal 'time-delta', which is an offset from the system clock. When Qp0zGetTimeofDay() is called to retrieve the software clock time, the time returned is calculated by taking the current system time, subtracting the QUTCOFFSET system value, then adding the internal time-delta.

The Qp0zSettTmeofDay() API sets or changes the time-delta, without affecting the system clock or the QUTCOFFSET system value. The Qp0zAdjtime() API slowly changes the time-delta, without affecting the system clock either. Adjustments are made at a rate of approximately 1 second of adjustment for every 100 seconds of elapsed time.

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