[cleanup] Remove old code in Dune::Timer
All threads resolved!
Dune::Timer
includes two alternative implementations
for measuring time. Historically one was based on getrusage()
and the other one on std::clock()
. The former was the default
and the latter could be enabled by defining a macro. Both in fact
measured the time spend computing by the process.
In fa43f4bf the default code path was changed from
getrusage()
to std::chrono::high_resolution_clock::now()
while std::clock()
could still be enabled by the macro.
This was in fact a breaking change because the new default
version measures the elapsed real time.
This patch removed the non-default version based on std::clock
because:
std::clock
adds up time spend computing in all threads of the
process. Thus time in concurrent threads is added up, while
the time a thread is sleeping is not counted.There a minor grain of salt: The documentation still documented the old behaviour and instead of 'fixing' the code this patch adjusts the documentation to established reality.