Namespaces
Variants

C Date and time utilities

From cppreference.net
 
 
 
C-style date and time utilities
Functions
Time manipulation
Format conversions
(deprecated in C++26)
(deprecated in C++26)
(C++26)
Constants
Types
(C++17)
 

Functions

Time manipulation
Defined in header <ctime>
computes the difference between times
(function)
returns the current time of the system as time since epoch
(function)
returns raw processor clock time since the program is started
(function)
returns the calendar time in seconds and nanoseconds based on a given time base
(function)
returns the resolution of calendar time based on a given time base
(function)
Format conversions
Defined in header <ctime>
(deprecated in C++26)
converts a std::tm object to a textual representation
(function)
(deprecated in C++26)
converts a std::time_t object to a textual representation
(function)
converts a std::tm object to custom textual representation
(function)
Defined in header <cwchar>
converts a std::tm object to custom wide string textual representation
(function)
Defined in header <ctime>
converts time since epoch to calendar time expressed as Universal Coordinated Time
(function)
converts time since epoch to calendar time expressed as local time
(function)
converts calendar time to time since epoch
(function)
(C++26)
converts calendar time to time since epoch, ignoring the Daylight Saving Time flag
(function)

Constants

Defined in header <ctime>
number of processor clock ticks per second
(macro constant)

Types

Defined in header <ctime>
calendar time type
(class)
time since epoch type
(typedef)
process running time
(typedef)
(C++17)
time in seconds and nanoseconds
(struct)

See also

C documentation for Date and time utilities