[Cs3] clocks
Mikhail Nesterenko
mikhail at cs.kent.edu
Mon Nov 16 13:00:17 EST 2015
CS3 students,
This is related to today's class discussion on clocks. So, C++11
chrono library abstracts time counting (and corresponding fractions:
how many milliseconds there are in a seconds, etc.)
Now, clock() is indeed elapsed process time (time waiting in ready or
i/o queue is not counted).
Also, system_clock that I originally used is not recommended because
it may potentially go backward (for example due to time network time
adjustments). steady_clock does not do that. Better yet
high_resolution_clock is the highest resolution timer available on this
architecture.
So I updated the code system_clock -> high_resolution_clock.
Thanks,
--
Mikhail
More information about the cs3
mailing list