Open System Services Programmer's Guide

SummaryFunction
Converts a character string to a time value.strptime()
Sets the time-zone conversion information.tzset()
Sets file access and modification times.utime()
Converts a date and time to a wide character string.wcsftime()
Features Unique to OSS Time Management
The OSS API does not provide functions that set or alter the system time or obtain information about
processor times. It also does not provide an internal timer.
Time-Management Interoperability
You can use Guardian time-management procedures from the OSS environment.
Guardian system clock procedures and OSS system clock functions can be called from both
Guardian and OSS processes. Because the OSS and Guardian time formats are incompatible,
only Guardian system clock procedures work on Guardian time formats and only OSS system
clock functions work on OSS time formats.
You can use the MYPROCESSTIME, PROCESS_GETINFO_, and PROCESS_GETINFOLIST_
procedures and the Measure product to obtain time information about an OSS process. The
PROCESS_GETINFO_ and PROCESS_GETINFOLIST_ procedures are especially useful in that they
can obtain information not just about the calling process, but about another process that you
specify.
When a Guardian process calls the OSS times() function, only restricted information is returned:
times are available for Guardian processes but not for processes that act on behalf of a Guardian
process.
You can use the utime() function to change Guardian file access and modification times of
unstructured files.
The alarm() and ualarm() functions use OSS signals to notify OSS processes and do not work
with Guardian processes, because OSS signals cannot be sent to Guardian processes.
You can use the Guardian SETLOOPTIMER procedure to limit processor time use in OSS processes.
Querying the System Clock
You query the system date and time in the OSS environment with the time() function as you
would in the UNIX operating system. The timestamp you get from the time() function is accurate
to the nearest second. If you need greater accuracy in OSS programs, you can call Guardian
system date and time procedures and obtain timestamps accurate to the centisecond or microsecond.
Guardian timestamps differ from the OSS timestamp as shown in Table 15.
Table 15 Guardian and OSS Timestamps
Guardian 64-Bit Julian
Timestamp
Guardian 48-Bit TimestampOSS TimestampFeature
MicrosecondCentisecondSecondPrecision
12:00 (noon) UTC January
1, 4713 B.C.
00:00 December 31, 1974
A.D.
00:00:00 UTC January 1,
1970 A.D. (the Epoch)
Beginning of Time
Guardian system clock procedures work only on Guardian timestamp formats, and OSS system
time-management functions work only on OSS timestamp formats. For example, the
INTERPRETJULIANDAYNO procedure requires a Julian day number, which does not exist in the
OSS API. Likewise, the strftime() function requires an OSS time object.
Time-Management Interoperability 167