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 fromdurationtypedef duration::rep repβ the rep of that duration, also borrowed fromduration(she's not reinventing anything, periodt)typedef chrono::time_point< steady_clock, duration > time_pointβ atime_pointmade ofsteady_clock+duration. that's her signature look β¨
π¦ Static Public Member Functions
static time_point now () noexceptβ grab the current time. it'snoexcept, 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'sconstexpr, 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
- ubuntu jammy: libstdc++-12-doc 12-20220319-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms