STD::CHRONO::HH_MM_SS(3cxx)
π NAME π
std::chrono::hh_mm_ss< _Duration > β that's the class, bestie, and this page is from the manual called 3cxx. It's the utility for splitting a duration into hours, minutes, and seconds. Periodt. β¨
β¨ SYNOPSIS β¨
First things first, include the header:
#include <chrono>
π Public Types π
precisionβ here's the full declaration, verbatim:
using precision = duration< common_type_t< typename _Duration::rep,
chrono::seconds::rep >, ratio< 1,
__detail::__pow10(fractional_width)> >
π Public Member Functions π
constexpr hh_mm_ss (_Duration __d)β the constructor: hand it a_Duration __dand it's ready to do its split-up thing. π«Άconstexpr chrono::hours hours () const noexceptβ the hours accessor, const and noexcept, living its best life.constexpr bool is_negative () const noexceptβ the negative-check accessor, also const noexcept.constexpr chrono::minutes minutes () const noexceptβ the minutes accessor. Slay.constexpr operator precision () const noexceptβ conversion operator toprecision, const noexcept.constexpr chrono::seconds seconds () const noexceptβ the seconds accessor.constexpr precision subseconds () const noexceptβ the subseconds accessor, returningprecision.constexpr precision to_duration () const noexceptβ theto_durationaccessor, returningprecision.
π¦ Static Public Attributes π¦
static constexpr unsigned fractional_widthβ yup, astatic constexpr unsignednamedfractional_width. Iconic.
π Friends π
template<typename > struct __detail::__utc_leap_secondβ this template struct is the friend. Note the little space aftertypename; we keep it exactly. π«Ά
π Detailed Description π
Here's the class declaration vibe:
template<typename _Duration>
class std::chrono::hh_mm_ss< _Duration >
The raw page has a tiny Doxygen quirk: a stray " sitting right before Utility for splitting a duration into hours, minutes, and seconds. We keep the chaos. π
This is a convenience type that provides accessors for the constituent parts (hours, minutes, seconds and subseconds) of a duration. It's giving "split the duration, bestie." π
Since: C++20 β no cap.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. π€β¨
Final sign-off: the footer's source/version + date line, with libstdc++ and the 3cxx manual name doing their thing β mwah π.
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms