I'm in the middle of writing some time code for the low latency part of the program.
Looking at what's available in the std :: chrono library, it's hard for me to write a temporary code that is portable.
- std :: chrono :: high_resolution_clock
- std :: chrono :: stable_clock
- stand :: chrono :: system_clock
System_clock is useless as it is unstable and the remaining two hours are problematic.
High_resolution_clock is not necessarily stable on all platforms.
Resistant_click does not necessarily support even-grain resolution time periods (ex: nano seconds)
For my goals, having a stable watch, this is the most important requirement, and I can sort it using microsecond granularity.
My question is, do you need a time code that can be run on different h / w architectures and operating systems - which would be the best option?
source share