How to get time since epoch in milliseconds in C++
Use this snippet using chrono
:
#include <chrono>
uint64_t timeSinceEpochMilliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::system_clock::now().time_since_epoch()
).count();