Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <chrono>
- #include <iostream>
- int main(){
- auto end = std::chrono::system_clock::now()+std::chrono::duration<int>(60);
- auto now = std::chrono::system_clock::now();
- while(now < end){
- now = std::chrono::system_clock::now();
- auto dif = end-now;
- auto sec = std::chrono::duration_cast<std::chrono::seconds>(dif);
- std::cout<<sec.count()<<std::endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement