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
tm_min
tm_hour
tm_mday
tm_mon
tm_year
tm_wday
tm_yday
tm_isdst