Jump to content

C++ Language/Std/CRuntime/Time/PreciseTime

From Wikibooks, open books for an open world

The current time obtained by std::time() is appropriate for uses like the timestamp of a file. But for a more precise measurement of time, set a std::chrono::time_point<std::chrono::high_resolution_clock> object to the value returned by std::chrono::high_resolution_clock::now().

Additional information about precisely measuring time (includes interactive examples)