Go to the first, previous, next, last section, table of contents.


Time Functions (`time.h')

This chapter groups functions used either for reporting on time (elapsed, current, or compute time) or to perform calculations based on time.

The header file `time.h' defines three types. clock_t and time_t are both used for representations of time particularly suitable for arithmetic. (In this implementation, quantities of type clock_t have the highest resolution possible on your machine, and quantities of type time_t resolve to seconds.) size_t is also defined if necessary for quantities representing sizes.

`time.h' also defines the structure tm for the traditional representation of Gregorian calendar time as a series of numbers, with the following fields:

tm_sec
Seconds.
tm_min
Minutes.
tm_hour
Hours.
tm_mday
Day.
tm_mon
Month.
tm_year
Year (since 1900).
tm_wday
Day of week: the number of days since Sunday.
tm_yday
Number of days elapsed since last January 1.
tm_isdst
Daylight Savings Time flag: positive means DST in effect, zero means DST not in effect, negative means no information about DST is available.


Go to the first, previous, next, last section, table of contents.