Advertisement
Guest User

Untitled

a guest
Jun 5th, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <chrono>
  2. #include <iostream>
  3.  
  4. int main(){
  5.     auto end = std::chrono::system_clock::now()+std::chrono::duration<int>(60);
  6.     auto now = std::chrono::system_clock::now();
  7.  
  8.     while(now < end){
  9.         now = std::chrono::system_clock::now();
  10.         auto dif = end-now;
  11.         auto sec = std::chrono::duration_cast<std::chrono::seconds>(dif);
  12.         std::cout<<sec.count()<<std::endl;
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement