This section describes the
time_t data type for representing
calendar time, and the functions which operate on calendar time objects.
These facilities are declared in the header file `time.h'.
TZto certain values (see section Specifying the Time Zone with
In the GNU C library,
time_t is equivalent to
In other systems,
time_t might be either an integer or
difftimefunction returns the number of seconds elapsed between time time1 and time time0, as a value of type
double. The difference ignores leap seconds unless leap second support is enabled.
In the GNU system, you can simply subtract
time_t values. But on
other systems, the
time_t data type might use some other encoding
where subtraction doesn't work directly.
timefunction returns the current time as a value of type
time_t. If the argument result is not a null pointer, the time value is also stored in
*result. If the calendar time is not available, the value
Go to the first, previous, next, last section, table of contents.