Obtain the current time from the system-wide monotonic clock.
time_point now() noexcept;
- Returns:
A
time_pointrepresenting the current time of the system-wide monotonic clock.- Throws:
An exception of type
std::system_errorif an error occurs.- Synchronization:
If one call to
std::chrono::monotonic_clock::now()happens-before another, thetime_pointreturned by the first call shall compare less-than or equal-to thetime_pointreturned by the second call.
Header
#include <chrono>