std::chrono..._ss::hours,(3)
π¦ std::chrono..._ss::hours,(3) β bestie edition π¦
okay so welcome to the std::chrono..._ss::hours,(3) page from the C++ Standard Libary manual π
no cap, this is the vibe check for these std::chrono::hh_mm_ss component getters, and we're gonna keep every detail fr fr β¨
πΈ NAME πΈ
std::chrono::hh_mm_ss::is_negative,std::chrono::hh_mm_ss::hours, -
std::chrono::hh_mm_ss::is_negative,std::chrono::hh_mm_ss::hours,
that's the whole name situation, commas and all β copy it exact, don't @ me π«Ά
β¨ Synopsis β¨
here's the signature lineup, literally exactly like this:
std::chrono::hh_mm_ss<Duration>::subseconds
constexpr bool is_negative() const noexcept; (1)
constexpr std::chrono::hours hours() const noexcept; (2)
constexpr std::chrono::minutes minutes() const noexcept; (3)
constexpr std::chrono::seconds seconds() const noexcept; (4)
constexpr precision subseconds() const noexcept; (5)
the tea β: these obtain the components of the stored "broken down" time. periodt π
π Return value π
let d be the represented duration:
trueifdis negative,falseotherwise.std::chrono::duration_cast<std::chrono::hours>(abs(d))std::chrono::duration_cast<std::chrono::minutes>(abs(d) - hours())std::chrono::duration_cast<std::chrono::seconds>(abs(d) - hours() - minutes())abs(d) - hours() - minutes() - seconds()ifstd::chrono::treat_as_floating_point_v<precision::rep>is true; otherwisestd::chrono::duration_cast<precision>(abs(d) - hours() - minutes() - seconds()).
π Example π
This section is incomplete π
Reason: no example.
π Category π
Todo no example
mwah π source: http://cppreference.com Β· date: 2024.06.10 Β· page: std::chrono..._ss::hours,(3)
π¦ 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