Created
February 5, 2020 16:58
-
-
Save OlivierLDff/263fa117804d3926b27c71243ec18b68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
#include <cstdint> | |
std::uint64_t now() const | |
{ | |
const auto timeNow = std::chrono::system_clock::now(); | |
const auto timeMs = std::chrono::duration_cast<std::chrono::milliseconds>(timeNow.time_since_epoch()); | |
const auto timestamp = timeMs.count(); | |
return timestamp; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment