Utility Functions and C Language Reference > C Language Reference > Alphabetical List of Functions > time


Example: time Date and Time Functions

Returns the system time.

time_t time( time_t *timeptr); 

timeptr Pointer to long integer that will store the time.

Return Values

The time function returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC), according to the system clock. The return value is stored in the location given by timeptr. If timeptr is NULL the value is not stored.