// 22.5HV2 Software Engineering II // Unit 2 Exercise 1 #include #include #include "clock.h" void main() { Clock timer(10,15); // create timer and set to 10.15am time_t t1, t2; // time_t is struct in time.h while (true) { // i.e. repeat indefinitely! t1= t2= time(NULL); // get current time in seconds while (difftime(t2,t1) < 1) { // wait for 1 second t2 = time(NULL); } timer.tick(); // advance timer by 1 second timer.show_time(); // display time } } // NOTE: You will need to exit program by typing ctrl-c