OLD | NEW |
---|---|
(Empty) | |
1 def get_seconds(utc=True): | |
2 """ | |
3 Read the current time out of the RTC | |
4 """ | |
5 return int(file('/sys/class/rtc/rtc0/since_epoch').readline()) | |
6 | |
7 | |
8 def set_wake_alarm(alarm_time): | |
9 """ | |
10 Set the hardware RTC-based wake alarm to 'alarm_time'. | |
11 """ | |
12 file('/sys/class/rtc/rtc0/wakealarm', 'w').write("%s\n" % str(alarm_time)) | |
13 | |
14 | |
OLD | NEW |