std::chrono::high_resolution_clock

std::chrono::high_resolution_clock

Defined in header <chrono>
class high_resolution_clock;
(since C++11)

Class std::chrono::high_resolution_clock represents the clock with the smallest tick period provided by the implementation. It may be an alias of std::chrono::system_clock or std::chrono::steady_clock, or a third, independent clock.

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

Member types

Member type Definition
rep arithmetic type representing the number of ticks in the clock's duration
period a std::ratio type representing the tick period of the clock, in seconds
duration std::chrono::duration<rep, period>
time_point std::chrono::time_point<std::chrono::high_resolution_clock>

Member constants

constexpr bool is_steady
[static]
true if the time between ticks is always constant, i.e. calls to now() return values that increase monotonically even in case of some external clock adjustment
(public static member constant)

Member functions

[static]
returns a std::chrono::time_point representing the current value of the clock
(public static member function)

See also

(C++11)
wall clock time from the system-wide realtime clock
(class)
(C++11)
monotonic clock that will never be adjusted
(class)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/chrono/high_resolution_clock

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部