Clock
C++概念:时钟
大Clock
概念描述了一个由std::chrono::duration
,一std::chrono::time_point
,和一个函数now()
获取当前时间[医]重点。时钟%27s时间的起源[医]点被称为时钟%27s的时代。
所需
C1
和C2
表示时钟类型。t1
和t2
返回的值是C1::now()
打电话回来的地方t1
在呼叫返回之前发生t2
这两个调用都发生在C1::time_point::max()
...
Expression | Return type | Operational semantics |
---|---|---|
C1::rep | An arithmetic type or a class emulating an arithmetic type | The representation type of C1::duration. |
C1::period | A specialization of std::ratio | The tick period of the clock in seconds. |
C1::duration | std::chrono::duration<C1::rep, C1::period> | The duration type of the clock. |
C1::time_point | std::chrono::time_point<C1> or std::chrono::time_point<C2, C1::duration> | The std::chrono::time_point type of the clock. C1 and C2 shall refer to the same epoch. |
C1::is_steady | const bool | true if t1 <= t2 is always true and the time between clock ticks is constant, otherwise false |
C1::now() | C1::time_point | Returns a time_point object representing the current point in time. |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。