Guardian C Library Calls Reference Manual

Summary of Library Header Files
Guardian TNS C Library Calls Reference Manual128833 2-13
<timeh>
<stringh>
The header stringh declares these string-handling functions:
ecvt memchr memcmp memcpy memmove memset
memswap stcarg stccpy stcd_i stcd_l stch_i
stci_d stcis stcisn stclen stcpm stcpma
stcu_d stpblk stpbrk stpchr stpsym stptok
strcat strchr strcmp strcpy strcspn strerror
strlen strncat strncmp strncpy strpbrk strrchr
strspn strstr strtok stscmp
<talh>
The header talh defines the three objectlike macros—CCE, CCG, and CCL—that denote
the condition-code states that a TAL function can return. Refer to the C/C++
Programmer’s Guide for information on how and when these macros are used.
<timeh>
The header timeh declares nine functions that deal with date, time, and the internal
clock. The header timeh also declares the CLOCKS_PER_SEC macro, two types
clock_t and time_t, and a structure type struct tm.
The CLOCKS_PER_SEC macro can be used to convert the value returned by the clock
function to seconds. The two types clock_t and time_t are arithmetic types capable of
representing time. Objects of type struct tm hold the components of a calendar time,
referred to as broken-down time.
The functions declared in timeh are:
asctime clock ctime
difftime gmtime localtime
mktime strftime time
The clock function determines how much processor time is used by a process up to the
point that the process invokes the clock function. The clock function returns the time in
microseconds; this value can be divided by CLOCKS_PER_SEC to convert it to
seconds.
In ISO/ANSI C, time comes in two principal versions: a “calendar time” expressed as an
integer, which represents the number of seconds that have elapsed since January 1, 1970,
and a “broken down time” expressed as a structure of type struct tm. The calendar time
is encoded with respect to Coordinated Universal Time (UTC). Use the time functions to
convert one version of time to the other. You can also print the time as a string.