time - get time of day
Standard C Library (libc, -lc)
#include <time.h>
time_t
time(time_t *ptr);
The current time (in seconds since midnight GMT on January 1, 1970) is retrieved. If ptr is non-null, the time is stored through ptr. The time is also returned.
time is a wrapper around the system call __time, which returns nanoseconds as well as seconds.
time returns the time. On error, -1 is returned, and errno is set to indicate the error.
The following error is the only way time should be capable of failing.
EFAULT | ptr was an invalid non-NULL address. |