ElapsedTimer: Measure amount of time with a monotonic clock.
https://sourceforge.net/p/acpl/code/ci/master/tree/acpl/Examples/ElapsedTimer/main.cpp
#include <iostream> #include <thread> #include <core/util/ElapsedTimer.hpp> using namespace acpl; using namespace std::chrono_literals; int main() { std::cout << "Start timer and wait for 2 seconds ...\n"; auto timer = ElapsedTimer::create(); std::this_thread::sleep_for(2s); std::cout << timer.elapsed().count() << " seconds later\n"; return 0; }