Accurate Time Measurement

Lesson overview

Topics covered: clock_gettime(CLOCK_MONOTONIC), timespec, nanosecond precision.

Accurate Time Measurement

clock_gettime(CLOCK_MONOTONIC) - monotonic clock
struct timespec - seconds and nanoseconds
gettimeofday() - deprecated but still used
Nanosecond precision for benchmarks, high-resolution timing

Article author: Arthur Isaev

Banner image