#include <time.h>
|
time_t
time (time_t *tloc); |
The return value is also stored in * tloc, provided that tloc is non-null.
/** * Detailed description : sample usage of time system call **/ #include <time.h> int main() { time_t Time ; if(time(&Time) < 0 ) { printf("Time system call failed \n") ; return -1 ; } printf("Time value is %u \n" , Time) ; return 0 ; }
Output
should print time value since the Epoch (00:00:00 UTC, January 1, 1970), measured in seconds.
Systems conforming to earlier versions of the C and POSIX standards (including older versions of ) did not set * tloc in the error case.
© 2005-2007 Nokia |