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

Unified Diff: client/site_tests/power_Resume/power_Resume.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, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/common_lib/sys_power.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/site_tests/power_Resume/power_Resume.py
diff --git a/client/site_tests/power_Resume/power_Resume.py b/client/site_tests/power_Resume/power_Resume.py
index fe74b15cfbb726bc8281293ce83a06cf23f7709c..688d83ba24c3e2e9e509a37bf60724d5f3bb2f1a 100644
--- a/client/site_tests/power_Resume/power_Resume.py
+++ b/client/site_tests/power_Resume/power_Resume.py
@@ -4,7 +4,7 @@
import commands, logging, random, re, time, utils
from autotest_lib.client.bin import test
-from autotest_lib.client.common_lib import error
+from autotest_lib.client.common_lib import error, rtc, sys_power
class power_Resume(test.test):
version = 1
@@ -100,12 +100,12 @@ class power_Resume(test.test):
time_to_sleep = 10
# Set the alarm
- alarm_time = int(utils.get_hwclock_seconds()) + time_to_sleep
+ alarm_time = rtc.get_seconds() + time_to_sleep
logging.debug('alarm_time = %d', alarm_time)
- utils.set_wake_alarm(alarm_time)
+ rtc.set_wake_alarm(alarm_time)
# Suspend the system to RAM
- utils.suspend_to_ram()
+ sys_power.suspend_to_ram()
# Get suspend and resume times from /var/log/messages
start_suspend_time = self._get_start_suspend_time()
« no previous file with comments | « client/common_lib/sys_power.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698