HP C/iX Library Reference Manual (30026-90004)

366 Chapter5
HP C/iX Library Function Descriptions
time
time
Returns the current calendar time.
Syntax
#include <time.h>
time_t time (time_t *
timer
);
Parameters
timer
If not NULL, a pointer to where the returned time is stored.
Return Values
x
Specifies the time elapsed seconds since the Epoch (00:00:00 Coordinated
Universal Time, January 1, 1970).
0 An error occurred and errno is set to EFAULT.
Description
The time function returns the number of elapsed seconds since the Epoch, 00:00:00
Coordinated Universal Time (Greenwich Mean Time), January 1, 1970. If
timer
is not
NULL, the return value is also assigned to the object that
timer
points to.
NOTE
If linking with the POSIX/iX library, refer to the description of time() located
in the MPE/iX Developer's Kit Reference Manual.
See Also
clock(), difftime(), mktime(), ANSI C 4.12.2.4