2 @chapter Time Functions (@file
{time.h
})
4 This chapter groups functions used either for reporting on time
5 (elapsed, current, or compute time) or to perform calculations based
8 The header file @file
{time.h
} defines three types. @code
{clock_t
} and
9 @code
{time_t
} are both used for representations of time particularly
10 suitable for arithmetic. (In this implementation, quantities of type
11 @code
{clock_t
} have the highest resolution possible on your machine,
12 and quantities of type @code
{time_t
} resolve to seconds.) @code
{size_t
}
13 is also defined if necessary for quantities representing sizes.
15 @file
{time.h
} also defines the structure @code
{tm
} for the traditional
16 representation of Gregorian calendar time as a series of numbers, with
21 Seconds, between
0 and
60 inclusive (
60 allows for leap seconds).
24 Minutes, between
0 and
59 inclusive.
27 Hours, between
0 and
23 inclusive.
30 Day of the month, between
1 and
31 inclusive.
33 Month, between
0 (January) and
11 (December).
36 Year (since
1900), can be negative for earlier years.
39 Day of week, between
0 (Sunday) and
6 (Saturday).
42 Number of days elapsed since last January
1, between
0 and
365 inclusive.
45 Daylight Savings Time flag: positive means DST in effect, zero means DST
46 not in effect, negative means no information about DST is available.
47 Although for mktime(), negative means that it should decide if DST is in
52 * Function asctime:: Format time as string
53 * Function clock:: Cumulative processor time
54 * Function ctime:: Convert time to local and format as string
55 * Function difftime:: Subtract two times
56 * Function gmtime:: Convert time to UTC (GMT) traditional representation
57 * Function localtime:: Convert time to local representation
58 * Function mktime:: Convert time to arithmetic representation
59 * Function strftime:: Convert date and time to a user-formatted string
60 * Function time:: Get current calendar time (as single number)
61 * Function __tz_lock:: Lock time zone global variables
62 * Function tzset:: Set timezone info
66 @include time/asctime.def
69 @include time/clock.def
72 @include time/ctime.def
75 @include time/difftime.def
78 @include time/gmtime.def
81 @include time/lcltime.def
84 @include time/mktime.def
87 @include time/strftime.def
90 @include time/time.def
93 @include time/tzlock.def
96 @include time/tzset.def