std::chrono..._ss::hours,(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ¦‹ 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:

  1. true if d is negative, false otherwise.
  2. std::chrono::duration_cast<std::chrono::hours>(abs(d))
  3. std::chrono::duration_cast<std::chrono::minutes>(abs(d) - hours())
  4. std::chrono::duration_cast<std::chrono::seconds>(abs(d) - hours() - minutes())
  5. abs(d) - hours() - minutes() - seconds() if std::chrono::treat_as_floating_point_v<precision::rep> is true; otherwise std::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