std::chrono::file_clock::to_sys, std::chrono::file_clock::from_sys
来自 cppreference.cn
< cpp | chrono | file clock
template< class Duration > static std::chrono::sys_time</*参见下文*/> |
(1) | (自 C++20 起) (可选*) |
template< class Duration > static std::chrono::file_time</*参见下文*/> |
(2) | (自 C++20 起) (可选*) |
1) 将
file_time
t 转换为表示相同时间点的 sys_time
。2) 将
sys_time
t 转换为表示相同时间点的 file_time
。返回类型的 duration 从 Duration
以未指定的方式计算。
这些函数模板是可选的:实现可以选择提供 to_utc()
和 from_utc()
来代替。
目录 |
[edit] 返回值
1) 一个
sys_time
,表示与参数相同的时间点。2) 一个
file_time
,表示与参数相同的时间点。[edit] 注解
用户代码通常应使用 std::chrono::clock_cast,它提供了一个通用的接口来转换时钟之间的时间点,而不是直接调用这些函数。
[edit] 示例
本节内容不完整 原因:没有示例 |
[edit] 参见
[静态] (可选) |
在 file_time 和 utc_time 之间转换(公共静态成员函数) |
(C++20) |
转换一个时钟的时间点到另一个时钟 (函数模板) |