Last active
February 24, 2020 08:06
-
-
Save Borjis131/ceac3049211b76b552cea7857da03227 to your computer and use it in GitHub Desktop.
Displays current time since high_resolution_clock epoch in microseconds
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 <iostream> | |
#include <chrono> | |
int main(){ | |
std::chrono::high_resolution_clock clock; | |
while (1){ | |
uint64_t current_ms = std::chrono::duration_cast<std::chrono::microseconds>(clock.now().time_since_epoch()).count(); | |
std::cout << "\r" << current_ms << std::flush; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment