pastebin

Paste Search Dynamic
Recent pastes
duration cast milliseconds
  1. #include <iostream>
  2. #include <ctime>
  3. #include <chrono>
  4.  
  5. int main()
  6. {
  7.     using namespace std::chrono;
  8.  
  9.     uint64_t ms = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
  10.     std::cout << ms << " milliseconds since the Epochn";
  11.  
  12.     uint64_t sec = duration_cast<seconds>(system_clock::now().time_since_epoch()).count();
  13.     std::cout << sec << " seconds since the Epochn";
  14.  
  15.     return 0;
  16. }
Parsed in 0.007 seconds