Everything
7.4.22 <time.h>

Defines the macros and types for handling dates and times.

The following constants (macros) and types are all implementation-defined.

Type

Definition Name

Description

Constant

(macro)

NULL

Indicates the value when a pointer is not pointing at anything.

CLOCKS_PER_SEC

Indicates the unit of values returned by the clock function (number of values per second).

Type

size_t

Indicates the type of the result of an operation using the sizeof operator.

clock_t

Arithmetic type that can indicate the time consumed by the program.

time_t

Arithmetic type that can indicate the calendar time.

struct tm

Structure that holds the element of the calendar time.

 

Implementation-Defined Specifications

 

Item

Compiler Specifications

1

Value of macro NULL

Value 0.

2

Value of CLOCKS_PER_SEC

Value 1.

3

Type equivalent to size_t

unsigned long type

4

Type equivalent to clock_t

long type

5

Type equivalent to time_t

long long type

6

Members of struct tm and their order

int tm_sec; // seconds - [0,60]

int tm_min; // minutes - [0,59]

int tm_hour; // hours - [0,23]

int tm_mday; // days - [1,31]

int tm_mon; // Number of months from January - [0,11]

int tm_year; // Number of years from 1900

int tm_wday; // Number of days from Sunday - [0,6]

int tm_yday; // Number of days from January 1 - [0,365]

int tm_isdst; // Daylight Saving Time flag