#include //for this_thread #include //for seconds #include "timer.h" using namespace std; //Count down one second. timer& timer::operator--() //prefix decrement { if (--seconds < 0) { seconds = 60 - 1; if (--minutes < 0) { minutes = 60 - 1; --hours; } } this_thread::sleep_for(chrono::seconds(1)); return *this; }