time [ MPE/iX Developer's Kit Reference Manual Volume I ] MPE/iX 5.0 Documentation
MPE/iX Developer's Kit Reference Manual Volume I
time
Returns the number of seconds since the Epoch.
Syntax
#include <time.h>
time_t time (time_t *tloc);
Parameters
tloc If not NULL, a pointer to a variable of type time_t where the
number of seconds since the Epoch is returned. If NULL, no
value is stored.
Return Values
>=0 Success.
-1 An error occurred. The time is not returned, and errno is set
to indicate the error condition.
Description
The time() function calculates and returns the number of seconds since
the last Epoch (00:00:00 Coordinated Universal Time (UTC) January 1,
1970).
If tloc is not NULL, the same value is returned in the variable pointed
to by tloc. If tloc is NULL, no value is returned in tloc.
Implementation Considerations
Refer to the EFAULT error description below.
The TZ environment variable does not affect this function.
Errors
If an error occurs, errno is set to the following value:
EFAULT CAUSE The system detected a bad address in attempting to
use the tloc parameter.
ACTION Make sure that the pointer is correctly initialized.
See Also
<time.h>, POSIX.1 (Section 4.5.1)
MPE/iX 5.0 Documentation