I read about it and the numbers don't add up. On my operating system (Windows), I can check the resolution of the system clock as follows:
LARGE_INTEGER largeInt;
QueryPerformanceFrequency(&largeInt);
Everything is fine, but now I want to use std :: chrono to check the same details. According to cppreference.com and the popular answer on this site, the std :: chrono clock period is a compilation time coefficient consisting of a numerator and a denominator that determines how many seconds are between ticks.
cppreference.com:
period: a std :: relation representing the tick period (i.e. the number of seconds per tick)
And from the answer:
The minimum representable duration is high_resolution_clock :: period :: num / high_resolution_clock :: period :: den seconds. You can print it like this:
std::cout <<
(double)std::chrono::high_resolution_clock::period::num /
std::chrono::high_resolution_clock::period::den;
So I tried:
intmax_t numerator = std::chrono::high_resolution_clock::period::num;
intmax_t denominator = std::chrono::high_resolution_clock::period::den;
, , ? OS, , . , , 3903987, , .
, / , high_resolution_clock:: is_steady . 3903994 3903991, , , , . , , .
, / std:: chrono?