fork(12) download
  1. #include <chrono>
  2. #include <iostream>
  3. int main()
  4. {
  5. auto now = std::chrono::high_resolution_clock::now();
  6. typedef std::chrono::high_resolution_clock::period period_t;
  7. auto dur = now.time_since_epoch();
  8. std::cout << "High-res clock reports " << dur.count() << " ticks of 1/" << period_t::den << " seconds \n";
  9. }
Success #stdin #stdout 0s 2828KB
stdin
Standard input is empty
stdout
High-res clock reports 1337019526853437 ticks of 1/1000000 seconds