| Index: client/common_lib/rtc.py
|
| diff --git a/client/common_lib/rtc.py b/client/common_lib/rtc.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ac2319547c978c59ea18b06609156ab41ff7e50b
|
| --- /dev/null
|
| +++ b/client/common_lib/rtc.py
|
| @@ -0,0 +1,14 @@
|
| +def get_seconds(utc=True):
|
| + """
|
| + Read the current time out of the RTC
|
| + """
|
| + return int(file('/sys/class/rtc/rtc0/since_epoch').readline())
|
| +
|
| +
|
| +def set_wake_alarm(alarm_time):
|
| + """
|
| + Set the hardware RTC-based wake alarm to 'alarm_time'.
|
| + """
|
| + file('/sys/class/rtc/rtc0/wakealarm', 'w').write("%s\n" % str(alarm_time))
|
| +
|
| +
|
|
|