Skip to content

3.9 high resolution timers

JeffGarland edited this page May 14, 2013 · 1 revision

Problem

You need to measure time with a finer granularity than the full seconds that time returns.

Solution

Use the chrono library.

using std::chrono::high_resolution_clock;

high_resolution_clock::time_point tp == high_resolution_clock::now();
Clone this wiki locally