CTest doesn't use monotonic times leading to timeouts if device time changes
we've started to use CTest for our test running and it's generally running well.
It has been noticed that ctest doesn't use monotonic test timers, but instead relies on
gettimeofday(). When running on some of our devices, they start up thinking that it is the year 2000 but during the test run, NTP kicks in, and fast forwards the time to be 2017.
gettimeofday(), such a test would seem to have taken 17 years. It's generally preferred in such cases to use
We've found at least two instances in the CTest code base, and an attached is a patch to change
SystemTools::GetTime() to use
clock_gettime() in order to use monotonic timers.
Do these changes make sense?