spot::timer_map's timer walltime isn't cumulative
This line is probably a typo, and should be wall_cumul_ += ...
instead, if we want the walltime to be cumulative.
This results in wrong measurements if the timer is used in a loop, and started/stopped repeatedly.
Additionally, it uses std::chrono::high_resolution_clock
which leads to implementation defined behaviour (though I'm guessing most of the time our benchmarks are run with gcc and libstdc++) . Quoting cppreference:
The high_resolution_clock is not implemented consistently across different standard library implementations, and its use should be avoided. It is often just an alias for std::chrono::steady_clock or std::chrono::system_clock, but which one it is depends on the library or configuration. When it is a system_clock, it is not monotonic (e.g., the time can go backwards). For example, for gcc's libstdc++ it is system_clock, for MSVC it is steady_clock, and for clang's libc++ it depends on configuration.
Generally one should just use std::chrono::steady_clock or std::chrono::system_clock directly instead of std::chrono::high_resolution_clock: use steady_clock for duration measurements, and system_clock for wall-clock time.
If I understand this comment correctly we actually don't want a monotonic clock in this case?
I have a patch, which can probably be cherry picked as-is if this is indeed a bug.