gedeng/cpp/Time.cpp

14 lines
290 B
C++
Raw Normal View History

2021-04-30 10:23:14 +02:00
#include "Gedeng/Time.h"
#include <chrono>
namespace Gedeng {
unsigned long Time::get_time_ms() {
auto now = std::chrono::high_resolution_clock::now();
auto now_ms = std::chrono::time_point_cast<std::chrono::milliseconds>(now);
return now_ms.time_since_epoch().count();
}
}