std::chrono::file_clock::to_utc, std::chrono::file_clock::from_utc
來自 cppreference.com
< cpp | chrono | file clock
| template< class Duration > static std::chrono::utc_time</* 見下文 */> |
(1) | (C++20 起) (可選*) |
| template< class Duration > static std::chrono::file_time</* 見下文 */> |
(2) | (C++20 起) (可選*) |
1) 將
file_time t 轉換為表示同一時間點的 utc_time。2) 將
utc_time t 轉換為表示同一時間點的 file_time。返回型別的時長以未指定的方式從 Duration 計算得出。
這些函式模板是可選的:實現可以選擇轉而提供 to_sys() 和 from_sys()。
目錄 |
[編輯] 返回值
1) 一個表示與引數相同時間點的
utc_time。2) 一個表示與引數相同時間點的
file_time。[編輯] 注意
使用者程式碼通常應使用 std::chrono::clock_cast,它提供了一個通用介面來在時鐘之間轉換時間點,而不是直接呼叫這些函式。
[編輯] 示例
| 本節不完整 原因:無示例 |
[編輯] 參閱
| [static] (可選) |
在 file_time 和 sys_time 之間轉換(公共靜態成員函式) |
| (C++20) |
將一個時鐘的時間點轉換為另一個時鐘的時間點 (函式模板) |