C Date and time utilities

From Cppreference

Jump to: navigation, search

Contents

[edit] Functions

Defined in header <ctime>
Time manipulation
difftime
computes the difference between times
(function)
time
returns the current time of the system as time since epoch
(function)
clock
returns raw processor clock time since the program is started
(function)
Format conversions
asctime
converts a time_t object to a textual representation
(function)
ctime
converts a tm object to a textual representation
(function)
strftime
converts a tm object to custom textual representation
(function)
wcsftime
converts a tm object to custom wide string textual representation
(function)
gmtime
converts time since epoch to calendar time expressed as Universal Coordinated Time
(function)
localtime
converts time since epoch to calendar time expressed as local time
(function)
mktime
converts calendar time to time since epoch
(function)

[edit] Constants

CLOCKS_PER_SEC
number of processor clock ticks per second
(macro constant)

[edit] Types

tm calendar time type
time_t time since epoch type
clock_t process running time