名稱空間
變體
操作

std::chrono::file_clock::to_sys, std::chrono::file_clock::from_sys

來自 cppreference.com
< cpp‎ | chrono‎ | file_clock
 
 
 
 
template< class Duration >

static std::chrono::sys_time</*見下文*/>

    to_sys( const std::chrono::file_time<Duration>& t );
(1) (C++20 起)
(可選*)
template< class Duration >

static std::chrono::file_time</*見下文*/>

    from_sys( const std::chrono::sys_time<Duration>& t );
(2) (C++20 起)
(可選*)
1)file_time t 轉換為表示同一時間點的 sys_time
2)sys_time t 轉換為表示同一時間點的 file_time

返回型別的 duration 以未指定的方式從 Duration 計算。

這些函式模板是可選的:實現可以選擇提供 to_utc()from_utc()

目錄

[編輯] 返回值

1) 一個 sys_time,表示與引數相同的時間點。
2) 一個 file_time,表示與引數相同的時間點。

[編輯] 注意

使用者程式碼通常應使用 std::chrono::clock_cast,它提供了一個通用介面來在時鐘之間轉換時間點,而不是直接呼叫這些函式。

[編輯] 示例

[編輯] 另請參閱

[static] (可選)
file_timeutc_time 之間轉換
(公共靜態成員函式) [編輯]
將一個時鐘的時間點轉換為另一個時鐘的時間點
(函式模板) [編輯]