Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Side by Side Diff: client/common_lib/rtc.py

Issue 3516004: Exported utility functions for RTC and system sleep (Closed) Base URL: ssh://gitrw.chromium.org/autotest.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « client/bin/base_utils.py ('k') | client/common_lib/sys_power.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « client/bin/base_utils.py ('k') | client/common_lib/sys_power.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698