A type containing static helper functions for converting a Windows::Foundation::DateTime (that is, a std::chrono::time_point) to and from winrt::file_time, and to and from time_t.
winrt::clock is defined as using the same units as Windows::Foundation::DateTime (a signed 64-bit integer of 100-nanosecond intervals since Jan 1 1601). Other C++ standard clocks don't typically define their resolution, and don't use the epoch Jan 1 1601, which is a Windows Runtime/FILETIME epoch.
Syntaxstruct clock
Requirements
Minimum supported SDK: Windows SDK version 10.0.17134.0 (Windows 10, version 1803)
Namespace: winrt
Header: %WindowsSdkDir%Include<WindowsTargetPlatformVersion>\cppwinrt\winrt\base.h (included by default)
Member type aliases Alias name Type clock::rep A synonym for int64_t. clock::period A synonym for Windows::Foundation::TimeSpan::period. clock::duration A synonym for Windows::Foundation::TimeSpan. clock::time_point A synonym for Windows::Foundation::DateTime. Member functions clock::now functionRetrieves the current time as a Windows::Foundation::DateTime.
Syntaxstatic Windows::Foundation::DateTime now() noexcept;
Return value
The current time as a Windows::Foundation::DateTime.
clock::from_file_time functionConverts a winrt::file_time value to a Windows::Foundation::DateTime.
Syntaxstatic Windows::Foundation::DateTime from_file_time(winrt::file_time const& time) noexcept;
Parameters
time
A winrt::file_time value to convert to a Windows::Foundation::DateTime.
The winrt::file_time value converted into a Windows::Foundation::DateTime.
clock::from_time_t functionConverts a time_t value to a Windows::Foundation::DateTime.
Syntaxstatic Windows::Foundation::DateTime from_time_t(time_t time) noexcept;
Parameters
time
A time_t value to convert to a Windows::Foundation::DateTime.
The time_t value converted into a Windows::Foundation::DateTime.
clock::to_file_time functionConverts a Windows::Foundation::DateTime value to a winrt::file_time.
Syntaxstatic file_time to_file_time(Windows::Foundation::DateTime const& time) noexcept;
Parameters
time
A Windows::Foundation::DateTime value to convert to a winrt::file_time.
The Windows::Foundation::DateTime value converted into a winrt::file_time.
clock::to_time_t functionConverts a Windows::Foundation::DateTime value to a time_t.
Syntaxstatic time_t to_time_t(Windows::Foundation::DateTime const& time) noexcept;
Parameters
time
A Windows::Foundation::DateTime value to convert to a time_t*.
The Windows::Foundation::DateTime value converted into a time_t.
See alsoRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4