high_resolution_clock
struct
Represents a high_resolution clock with the smallest possible tick period. Specifically, the period is a nanosecond, or ratio<1, 1000000000>
In Microsoft's implementation, high_resolution_clock
is a synonym for steady_clock
.
Syntax
using high_resolution_clock = steady_clock;
Members
Convenience type aliases
Name | Description |
---|---|
high_resolution_clock::duration |
In Microsoft's implementation, it's a synonym for nanoseconds , which is defined as duration<long long, nano> . It represents a duration of time measured in billionths of a second. |
high_resolution_clock::period |
In Microsoft's implementation, it's a synonym for nano , which is defined as std::ratio<1i64, 1000000000i64> . It represents the time in seconds (one billionth of a second) between each tick in the duration. |
high_resolution_clock::rep |
A synonym for long long , which is the type used in the Microsoft implementation to represent the number of clock ticks in a high_resolution_clock::duration . |
high_resolution_clock::time_point |
A synonym for time_point<steady_clock> . Used to represent a time_point for this clock. |
Functions
Name | Description |
---|---|
now |
Returns the current high_resolution_clock time. |
Constants
Name | Description |
---|---|
is_steady |
Holds true . A high_resolution_clock is steady. That means you can use this clock to take the time before an event, the time after an event, and reliably subtract them to get the duration of the event because the clock won't be adjusted during that time. |
See also
<chrono>
file_clock class
gps_clock class
local_t
struct
steady_clock
struct
system_clock
struct
tai_clock
class
utc_clock
class
Header Files Reference