std::chrono::system_clock
From Cppreference
C++ Standard Library | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Utilities library | ||||||||||||||||||||||||||||||||||||||||
Date and time utilities | ||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||
Defined in header <chrono>
|
||
class system_clock;
|
(since C++11) | |
Class std::chrono::system_clock represents the system-wide real time wall clock. It may not be monotonic: on most systems, the system time can be adjusted at any moment. It is the only C++ clock that has the ability to map its time points to C time, and, therefore, to be displayed.
Contents |
[edit] Member types
Member type | Definition |
rep | signed arithmetic type representing the number of ticks in the clock's duration |
period | an std::ratio type representing the tick period of the clock, in seconds |
duration | std::chrono::duration<rep, period>, capable of representing negative durations |
time_point | the type of this clock's time point, std::chrono::time_point<system_clock> |
[edit] Member constants
[static]
|
indicates whether system_clock is steady (public static member constant) |
[edit] Member functions
[static]
|
returns a time_point representing the current point in time (public static member function) |
[static]
|
converts a system_clock time point to std::time_t (public static member function) |
[static]
|
converts std::time_t to a system_clock time point (public static member function) |
[edit] See also
(C++11)
|
monotonic clock that will never be adjusted (class) |
(C++11)
|
the clock with the shortest tick period available (class) |