示例#1
0
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()
示例#2
0
def main():
    config = Configuration()
    alarm = Alarm(config)
    alarm.start_alarm()