std::chrono::file_clock::to_sys, std::chrono::file_clock::from_sys
提供: cppreference.com
<tbody>
</tbody>
template <class Duration> static std::chrono::sys_time</*see below*/> to_sys(const std::chrono::file_time<Duration>& t); |
(1) | (C++20以上) (オプション) |
template <class Duration> static std::chrono::file_time</*see below*/> 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 を使用するべきです。 clock_cast は時計間で時点を変換するための汎用インタフェースを提供します。
関連項目
[静的] (オプション) |
file_time と utc_time の間で変換します (パブリック静的メンバ関数) |
(C++20) |
ある時計の時点を別の時計に変換します (関数テンプレート) |