Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (T-V)
Guardian Procedure Calls Reference Manual—522629-013
15-13
TIMESTAMP Procedure
Procedures that work with the 48-bit timestamp are CONTIME, TIME, and
TIMESTAMP.
•
A 64-bit Julian timestamp is based on the Julian date. It is a quantity equal to the
number of microseconds since January 1, 4713 B.C., 12:00 (noon) Greenwich
mean time (Julian proleptic calendar). This timestamp can represent either
Greenwich mean time, local standard time, or local civil time. There is no way to
examine a Julian timestamp and determine which of the three times it represents.
Procedures that work with the 64-bit Julian timestamp are COMPUTETIMESTAMP,
CONVERTTIMESTAMP, INTERPRETTIMESTAMP, JULIANTIMESTAMP, and
SETSYSTEMCLOCK.
•
Process creation time is initialized by calling TIMESTAMP, which returns the local
civil time in centiseconds (0.01 second = 10 milliseconds) since midnight (00:00)
on 31 December 1974, in an array of three words. Only the two low-order words
are saved in the process control block (PCB); this is sufficient to make the
unnamed process ID unique.
•
The RCLK instruction ($READCLOCK in TAL) is another source of timestamps. It
returns a 64-bit timestamp representing the local civil time in microseconds since
midnight (00:00) on 31 December 1974. Note that this is not a Julian timestamp.
•
Process timing uses 64-bit elapsed time counters with microsecond resolution;
these are not Julian timestamps either.
•
There is no way to generalize about internal timing using 64-bit Julian timestamps
or 48-bit timestamps. Each section of the operating system manages time using
the method most appropriate for its application.
•
All time and calendar units in this discussion are defined in The Astronomical
Almanac published annually by the U.S. Naval Observatory and the Royal
Greenwich Observatory.
Example
CALL TIMESTAMP ( TIMESTAMP^BUF );
Related Programming Manual
For programming information about the TIMESTAMP utility procedure, refer to the
Guardian Programmer’s Guide.