1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include "timestamp.h" #include <time.h> #include <iostream> #include <chrono> double amb::currentTime() { auto tm = std::chrono::steady_clock::now(); double time = std::chrono::duration_cast<std::chrono::milliseconds>(tm.time_since_epoch()).count() / 1000.00; return time; }