Guardian Programmer's Guide

Table Of Contents
Managing Time
Guardian Programmer’s Guide 421922-014
18 - 25
Managing System Time
Managing System Time
This subsection describes system-clock functions such as setting the system clock and
checking the system clock.
Remember that system time is the result of periodically synchronizing the clocks in the
system using a clock-averaging algorithm. By taking the average value of the various
CPU clocks, the system creates the concept of system time. When you obtain the
system time, you are really obtaining the time in the local CPU, corrected by an
adjustment value that is periodically updated by the clock-averaging algorithm.
The system time contains four adjustments:
Average time adjustment, to align the time on this processor with the average time.
The operating system makes this adjustment automatically and periodically, by
circulating a message among the processors.
Average rate adjustment, to make the time on this processor advance at the same
rate as the average time. The operating system makes this adjustment
automatically from successive observations of the time adjustment.
External time adjustment, to align the system time with an external reference
source. This adjustment is specified by a call to the SYSTEMCLOCK_SET_ or
SETSYSTEMCLOCK procedure.
External rate adjustment, to make the system time advance at the same rate as
the external source. This adjustment has been zero on all operating systems
delivered since 2001, until the J06.14 and H06.25 RVUs. As of these RVUs, it is
specified by a call to the SYSTEMCLOCK_SET_ or SETSYSTEMCLOCK
procedure.
The operations you can perform on system time are:
Check the system time (TIME procedure)
Set or adjust the system time or system clock rate
(SYSTEMCLOCK_SET_/SETSYSTEMCLOCK procedure)
Add a transition to the daylight-saving-time (DST) transition table
(ADDDSTTRANSITION procedure, which is superseded by the
DST_TRANSITION_ADD_ procedure on G05.00 and later G-series release
systems)
You can perform the following operations on G05.00 and later G-series release
systems:
Add a transition to the daylight-saving-time (DST) transition table
(DST_TRANSITION_ADD_ procedure)
Delete a transition from the DST table (DST_TRANSITION_DELETE_
procedure)