The std::chrono::steady_clock class provides access to
the system-wide steady clock. The current time can be obtained by calling
std::chrono::steady_clock::now().
There is no fixed relationship between values returned by std::chrono::steady_clock::now()
and wall-clock time. A steady clock cannot go backwards, so if one call
to std::chrono::steady_clock::now()
happens-before another call to std::chrono::steady_clock::now(), the second call must return a time-point
equal to or later than the first. The clock advances at a uniform rate
as far as possible.
class steady_clock { public: typedef unspecified-integral-type rep; typedef std::ratio< unspecified,unspecified> period; typedef std::chrono::duration<rep,period> duration; typedef std::chrono::time_point<steady_clock> time_point; static const bool is_steady=true; static time_point now() noexcept; // for backwards compatibility only static const bool is_monotonic=true; };
Header
#include <chrono>