Skip to content

CTest: adopt std::chrono::system_clock

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

After the refactor to make CTest use std::chrono::steady_clock for the keeping of time for test duration, there are still references to cmSystemTools::GetTime() left. To further adopt std::chrono for time related activities, this commit changes those remaining references to std::chrono::system_clock::now() calls and alters the storage from either unsigned int or double to std::chrono::system_clock::time_point.

For ease of conversion, a converter method is added to cmXMLWriter that converts from a std::chrono::system_clock::time_point to the number of seconds since the UN*X epoch as that is expected behaviour. This means no more casts as required.

Functionally should be no difference as the system_clock is implemented in the same terms.

Merge request reports