|
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <chrono> | ||
template<class Duration> class hh_mm_ss; | (since C++20) | |
The class templatehh_mm_ss splits astd::chrono::duration into a "broken down" time such ashours:minutes:seconds, with the precision of the split determined by theDuration template parameter. It is primarily a formatting tool.
Duration must be a specialization ofstd::chrono::duration, otherwise the program is ill-formed.
Contents |
constexpr unsigned fractional_width [static] | the smallest possible integer in the range[0, 18] such thatprecision (see below) will exactly represent the value ofDuration{1}, or6 if there's no such integer(public static member constant) |
| Member type | Definition |
precision | std::chrono::duration<std::common_type_t<Duration::rep, std::chrono::seconds::rep>, std::ratio<1,10 |
constructs ahh_mm_ss(public member function)[edit] | |
| obtains components of the broken-down time (public member function)[edit] | |
| obtains the storedstd::chrono::duration (public member function)[edit] |
(C++20) | outputs ahh_mm_ss into a stream(function template)[edit] |
formatting support forhh_mm_ss(class template specialization)[edit] |