std::chrono::steady_clock
Defined in header <chrono> | | |
|---|---|---|
class steady_clock; | | (since C++11) |
类std::chrono::steady_clock表示单调的时钟。这个时钟的时间点不能随着物理时间的推移而减少。此时钟与挂钟时间%28无关--例如,它可以是自上次重新启动%29以来的时间,并且最适合测量间隔时间。
std::chrono::steady_clock满足…的要求TrivialClock...
成员类型
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::steady_clock> |
成员常数
constexpr bool is_steady static | steady clock flag, always true (public static member constant) |
|---|
成员函数
now static | returns a time_point representing the current value of the clock (public static member function) |
|---|
另见
system_clock (C++11) | wall clock time from the system-wide realtime clock (class) |
|---|---|
high_resolution_clock (C++11) | the clock with the shortest tick period available (class) |
© cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

