Skip to content

CTest: use std::chrono::steady_clock for time keeping

dublet requested to merge dublet/cmake:ctest-chrono into master

It was reported in issue #17345 (closed) that CTest does not use monotonic time to report test duration. Monotonic clocks are not affected by large NTP adjustments or things like daylight savings time.

As CMake 3.10 requires C++11, which introduced std::chrono, this commit moves the time keeping in CTest from cmSystemTools::GetTime() to std::chrono::steady_clock.

Edited by Brad King

Merge request reports