std::chrono::file_clock_C++中文网

using file_clock = /* see below */;

(C++20 起)

std::chrono::file_clock 是用于 std::filesystem::file_time_type 的时钟的别名。不指定其纪元。

时间点族

定义于命名空间 std::chrono

template<class Duration>
using file_time = std::chrono::time_point<std::chrono::file_clock, Duration>;

(C++20 起)

成员类型

 
成员类型 定义
rep 表示时钟时长中计次数的有符号算术类型
period 表示时钟计次周期的 std::ratio 类型,单位为秒
duration std::chrono::duration<rep, period> ,足以表示负时长
time_point std::chrono::time_point<std::chrono::file_clock>

成员常量

constexpr bool is_steady

[静态]

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

成员函数

file_clock 提供下列二对静态成员函数中的一对:

  • to_utcfrom_utc ;或
  • to_sysfrom_sys