std::chrono...ck::from_sys(3)
πΈ std::chrono::file_clock::to_sys & std::chrono::file_clock::from_sys πΈ
okay bestie, welcome to the std::chrono...ck::from_sys(3) page from the C++ Standard Libary manual (yes, βLibaryβ is literally how itβs spelled there π
). This is the std::chrono::file_clock::to_sys / std::chrono::file_clock::from_sys zone, and itβs giving optional conversion-template realness. Letβs get into it.
π NAME
std::chrono::file_clock::to_sys,std::chrono::file_clock::from_sysβstd::chrono::file_clock::to_sys,std::chrono::file_clock::from_sys
β¨ Synopsis β¨
template< class Duration >
static std::chrono::sys_time</*see below*/>
to_sys( const std::chrono::file_time<Duration>& t );
(1) (since C++20) (optional)
template< class Duration >
static std::chrono::file_time</*see below*/>
from_sys( const std::chrono::sys_time<Duration>& t );
(2) (since C++20) (optional)
- Converts the
file_timetto asys_timerepresenting the same point in time. - Converts the
sys_timetto afile_timerepresenting the same point in time.
The duration of the return type is computed from Duration in an unspecified manner. no cap, thatβs what it says π«Ά
These function templates are optional: an implementation may choose to instead provide to_utc and from_utc.
π Return value π
- A
sys_timerepresenting the same point in time as the argument. - A
file_timerepresenting the same point in time as the argument.
π¦ Notes π¦
User code should usually use std::chrono::clock_cast, which provides a generic interface to convert time points between clocks, rather than call these functions directly. bestie, thatβs the main-character move π
π Example π
This section is incomplete
Reason: no example
π they really said βno exampleβ and left. iconic but unhelpful.
π₯ See also π₯
to_utcβ converts betweenfile_timeandutc_timefrom_utcβ(public static member function)[static] (optional)β yep, thatβs the tag sitting right there in the blockclock_cast(C++20)β convert time points of one clock to another(function template)
π·οΈ Category
Todo no example
π«Ά source/version + date check, bestie:http://cppreference.com,2024.06.10, and this pageβs footer id isstd::chrono...ck::from_sys(3). thatβs the whole sign-off π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms