std::chrono::high_resolution_clock

定义于头文件 <chrono>
class high_resolution_clock;
(C++11 起)

std::chrono::high_resolution_clock 表示实现提供的拥有最小计次周期的时钟。它可以是 std::chrono::system_clockstd::chrono::steady_clock 的别名,或第三个独立时钟。

std::chrono::high_resolution_clock 满足平凡时钟 (TrivialClock) 的要求。

目录

成员类型

成员类型 定义
rep 表示时钟的时期中计次数的算术类型
period 表示时钟计次周期的 std::ratio 类型,单位为秒
duration std::chrono::duration<rep, period>
time_point std::chrono::time_point<std::chrono::high_resolution_clock>

成员常量

constexpr bool is_steady
[静态]
若时间间隔计次始终为常量,即纵使在外部时钟调整的情况下,调用 now() 的返回值亦单调递增,则为 true ,否则为 false
(公开静态成员常量)

成员函数

[静态]
返回表示时钟当前值的 std::chrono::time_point
(公开静态成员函数)

参阅

(C++11)
来自系统范围实时时钟的壁钟时间
(类)
(C++11)
决不调整的单调时钟
(类)

版本历史

  • (当前 | 先前 2017年9月22日 (五) 05:54Fruderica讨论 | 贡献 . . (1,712字节) (-2). . (撤销)
  • 当前 | 先前 2017年9月22日 (五) 05:54Fruderica讨论 | 贡献. . (1,714字节) (-1,133). . (撤销)
  • 当前 | 先前 2013年7月2日 (二) 08:21P12bot讨论 | 贡献 . . (2,847字节) (-141). . (Use {{lc}}. Update links. Various fixes.) (撤销)
  • 当前 | 先前 2012年11月2日 (五) 16:07P12bot讨论 | 贡献 . . (2,988字节) (+321). . (r2.7.3) (机器人添加:de, en, es, fr, it, ja, pt, ru) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 10:51P12讨论 | 贡献 . . (2,667字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 07:00TranslationBot讨论 | 贡献. . (2,667字节) (-74). . (Translated from the English version using Google Translate) (撤销)
  • 当前 | 先前 2012年10月25日 (四) 14:14P12讨论 | 贡献 . . (2,741字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前) 2012年10月25日 (四) 13:00TranslationBot讨论 | 贡献. . (2,741字节) (+2,741). . (Translated from the English version using Google Translate)