// 22.5HV2 Software Engineering II // Unit 4 Exercise 4 #include #include #include "alarm_clock2.h" void main() { Alarm_clock2 timer(10,15); // create timer and set to 10.15am time_t t1, t2; // time_t is struct in time.h timer.set_alarm(10,16); while (true) { // i.e. repeat indefinitely! t1 = 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