def main(): config = Configuration() while (1): # loop forever alarm = Alarm(config) while datetime.now( ) < alarm.alarm_time: # loop until the current time is after the alarm time sleep(5) # drastically reduces CPU time while polling alarm.start_alarm()
def main(): config = Configuration() alarm = Alarm(config) alarm.start_alarm()