在线文档教程

Clock

C++概念:时钟

Clock概念描述了一个由std::chrono::duration,一std::chrono::time_point,和一个函数now()获取当前时间[医]重点。时钟%27s时间的起源[医]点被称为时钟%27s的时代。

所需

C1C2表示时钟类型。t1t2返回的值是C1::now()打电话回来的地方t1在呼叫返回之前发生t2这两个调用都发生在C1::time_point::max()...

ExpressionReturn typeOperational semantics
C1::repAn arithmetic type or a class emulating an arithmetic typeThe representation type of C1::duration.
C1::periodA specialization of std::ratioThe tick period of the clock in seconds.
C1::durationstd::chrono::duration<C1::rep, C1::period>The duration type of the clock.
C1::time_pointstd::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_steadyconst booltrue if t1 <= t2 is always true and the time between clock ticks is constant, otherwise false
C1::now()C1::time_pointReturns a time_point object representing the current point in time.

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cpPreference.com/w/cpp/概念性/时钟