Namespaces
Variants
Actions

std::chrono::system_clock

From cppreference.com
< cpp‎ | chrono
 
 
 
 
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-style time.

std::chrono::system_clock meets the requirements of TrivialClock.

The epoch of system_clock is unspecified, but most implementations use Unix Time (i.e., time since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970, not counting leap seconds).

(until C++20)

system_clock measures Unix Time (i.e., time since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970, not counting leap seconds).

(since C++20)

Contents

Time point family

Defined in namespace std::chrono
template<class Duration>
using sys_time = std::chrono::time_point<std::chrono::system_clock, Duration>;
(since C++20)
using sys_seconds = sys_time<