Объекты класса system_clock представляют время настенных часов из общесистемных часов реального времени.
class system_clock { public: using rep = see below; using period = ratio<unspecified, unspecified>; using duration = chrono::duration<rep, period>; using time_point = chrono::time_point<system_clock>; static constexpr bool is_steady = unspecified; static time_point now() noexcept; // Map to C API static time_t to_time_t (const time_point& t) noexcept; static time_point from_time_t(time_t t) noexcept; };
using system_clock::rep = unspecified;
Requires: system_clock::duration::min() < system_clock::duration::zero() будет true.
[ Note: Это означает, что rep это знаковый тип. ]
— end note
static time_t to_time_t(const time_point& t) noexcept;
static time_point from_time_t(time_t t) noexcept;
Объекты класса steady_clock представляют собой часы, для которых значения time_point никогда не уменьшаются по мере продвижения физического времени и для которых значения time_point продвигаются с постоянной скоростью относительно реального времени. То есть часы не могут быть настроены.
class steady_clock { public: using rep = unspecified; using period = ratio<unspecified, unspecified>; using duration = chrono::duration<rep, period>; using time_point = chrono::time_point<unspecified, duration>; static constexpr bool is_steady = true; static time_point now() noexcept; };
Объекты класса high_resolution_clock представляют собой часы с самым коротким периодом тика. high_resolution_clock может быть синонимом system_clock или steady_clock.
class high_resolution_clock { public: using rep = unspecified; using period = ratio<unspecified, unspecified>; using duration = chrono::duration<rep, period>; using time_point = chrono::time_point<unspecified, duration>; static constexpr bool is_steady = unspecified; static time_point now() noexcept; };