首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

Clock

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

所需

C1C2表示时钟类型。t1t2返回的值是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.

代码语言:txt
复制
 ? cppreference.com

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com