Skip to content

[log] Use system_clock instead of high_resolution_clock

Florian Schmaus requested to merge flow/emper:use-system-clock into master

According to the 'Notes' section of https://en.cppreference.com/w/cpp/chrono/high_resolution_clock one should just use steady_clock or system_clock. Furthermore, the notes state that with GCC's libstdc++ high_resolution_clock is system_clock, but for LLVM's libc++ it depends on the configuration (and is steady_clock). But steady_clock has no to_time_t() member function.

Hence we explicitly uses system_clock now, which always has to_time_t(), i.e. in libstdc++ and in libc++. This allows us to get rid of the GLIBCXX (libstdc++) specific code.

Merge request reports