Answers for "c++ milliseconds"

C++
0

c++ milliseconds

#include <chrono>

uint32_t GetMillis() {
	using namespace std::chrono;
	return static_cast<uint32_t>(duration_cast<milliseconds>(
		system_clock::now().time_since_epoch()).count());
}
Posted by: Guest on February-10-2021

Browse Popular Code Answers by Language