std::chrono::steady_clock(3cxx)

✨ std::chrono::steady_clock ✨

okay bestie, welcome to the std::chrono::steady_clock page πŸ’– this one's a <chrono> girlie from libstdc++ (the C++ standard library, iykyk) and honestly she's the most trustworthy clock in the whole friend group.


🌸 NAME 🌸

std::chrono::steady_clock β€” the monotonic clock. she only goes up, no cap πŸ“ˆπŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

πŸ’œ Public Types

  • typedef chrono::nanoseconds duration β€” the duration type she rolls with, and yes it's nanoseconds ⏱️
  • typedef duration::period period β€” the period of that duration, borrowed straight from duration
  • typedef duration::rep rep β€” the rep of that duration, also borrowed from duration (she's not reinventing anything, periodt)
  • typedef chrono::time_point< steady_clock, duration > time_point β€” a time_point made of steady_clock + duration. that's her signature look ✨

πŸ¦‹ Static Public Member Functions

  • static time_point now () noexcept β€” grab the current time. it's noexcept, so no surprises, we love a low-drama function 🫢

🌈 Static Public Attributes

  • static constexpr bool is_steady β€” the flag that says "yes, I'm steady." it's constexpr, so she's compile-time famous πŸ‘‘

πŸ’… Detailed Description πŸ’…

Monotonic clock. that's the whole vibe πŸ’«

the time she returns has the property of only increasing at a uniform rate β€” so she never goes backwards, never jumps around, never does that chaotic thing. main character energy fr fr πŸ•°οΈπŸ‘‘

ngl, "only increasing at a uniform rate" is the flex here. if you need a clock that won't betray you mid-measurement, this is her πŸ’–

Definition at line 1150 of file chrono.h β€” go look, she's literally right there πŸ“–βœ¨


🧚 Author 🧚

Generated automatically by Doxygen for libstdc++ from the source code. so nobody hand-wrote this one, the robot did it πŸ€–πŸ’œ


mwah πŸ’‹ that's the page! this beautiful little manual came from libstdc++, dated Sat Mar 19 2022 β€” screenshot it, cite it, love it πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from