time
raw OCR
Gets time of day.
Defined in header <time.h>
Syntax
#include <time.h>
time_t time(time_t *f/mer);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ | ■ | ■ |
Remarks
time gives the current time, in seconds, elapsed since 00:00:00 GMT, January 1,1970, and stores that value in the location pointed to by timer, provided that timer is not a null pointer.
Return value
time returns the elapsed time in seconds, as described.
See also
Example
#include <time.h>
#include <stdio.h>
#include <dos.h>
int main(void)
(
time_t t;
t = time(NULL);
printfC'The number of seconds since January 1, 1970 is %ld",t);
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/time.h/time/
· short form /3.1/time/