std::chrono::steady_clock(3)

πŸ’– NAME πŸ’–

std::chrono::steady_clock - std::chrono::steady_clock

okay so welcome to the std::chrono::steady_clock(3) page from the C++ Standard Libary β€” yes, β€œLibary” is literally what the header says, we’re not fixing her πŸ’…. This is your bestie-approved guide to the clock that refuses to go backwards. iykyk ⏰✨


🌸 Synopsis 🌸

Defined in header <chrono>
class steady_clock;         (since C++11)

Class std::chrono::steady_clock represents a monotonic clock. The time points of this clock cannot decrease as physical time moves forward, and the time between ticks of this clock is constant. This clock is not related to wall clock time (for example, it can be time since last reboot), and it’s most suitable for measuring intervals. Also, std::chrono::steady_clock meets the requirements of TrivialClock. No cap, that’s the whole vibe πŸ•°οΈπŸ’«


πŸ¦‹ Member types πŸ¦‹

  • rep β€” an arithmetic type representing the number of ticks in the clock’s duration.
  • period β€” a std::ratio type representing the tick period of the clock, in seconds.
  • duration β€” std::chrono::duration<rep, period>.
  • time_point β€” std::chrono::time_point<std::chrono::steady_clock>.

πŸŽ€ Member constants πŸŽ€

  • constexpr bool is_steady β€” the steady clock flag, always true; [static] (public static member constant).

πŸ’œ Member functions πŸ’œ

  • now β€” returns a time_point representing the current value of the clock; [static] (public static member function).

🌈 See also 🌈

  • system_clock β€” wall clock time from the system-wide realtime clock; (C++11) (class).
  • high_resolution_clock β€” the clock with the shortest tick period available; (C++11) (class).

okay that’s the whole page, bestie β€” source is http://cppreference.com, dated 2024.06.10, and the manual name is std::chrono::steady_clock(3). mwah πŸ’‹βœ¨πŸ«Ά

πŸ“¦ where this page comes from