std::chrono::file_clock::to_sys, std::chrono::file_clock::from_sys
时间点 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
时长 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
时钟 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
当天时刻 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
日历 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
时区 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
chrono
I/O
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++20)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
C 风格日期和时间 |
成员函数 | ||||
|
||||
file_clock::to_sysfile_clock::from_sys
(仅若不提供
to_utc
和
from_utc
才提供)
|
||||
|
||||
(仅若不提供
to_sys
和
from_sys
才提供)
|
||||
时间点 I/O | ||||
template
<class
Duration>
static
std::chrono::sys_time</*see
below*/> |
(1) | (C++20
起) (可选) |
template
<class
Duration>
static
std::chrono::file_time</*see
below*/> |
(2) | (C++20
起) (可选) |
file_time
t
为表示同一时间点的 sys_time
。sys_time
t
为表示同一时间点的 file_time
。从 Duration
以未指定方式计算返回类型的时长。
这些函数模板是可选的:实现可以替而选择提供 to_utc
和 from_utc
。
返回值
sys_time
。file_time
。注意
用户代码通常应使用 std::chrono::clock_cast ,它对时钟间转换提供通用接口,而非直接调用这些函数。
参阅
[静态]
(可选)
|
在 file_time 与 utc_time 之间转换 (公开静态成员函数) |
(C++20)
|
转换一个时钟的时间点为另一个 (函数模板) |