time_t time ( time_t * timer );
Get current time
Get the current calendar time as a
time_t object.
The function returns this value, and if the argument is not a null pointer, the value is also set to the object pointed by timer.
Parameters
- timer
Pointer to an object of type time_t, where the time value is stored.
Alternativelly, this parameter can be a null pointer, in which case the parameter is not used, but the a time_t object is still returned by the function.
Return Value
The current calendar time as a time_t object.
If the argument is not a null pointer, the return value is the same as the one stored in the location pointed by the argument.
If the function could not retrieve the calendar time, it returns a -1 value.
Value returned is the number of seconds since midnight Jan 1, 1970
GMT.
www.cplusplus.com