summaryrefslogtreecommitdiffstats
path: root/firmware/powermgmt.c
diff options
context:
space:
mode:
authorRichard Quirk <richard.quirk@gmail.com>2012-10-05 21:30:13 +0200
committerJonathan Gordon <rockbox@jdgordon.info>2012-10-06 11:59:13 +0200
commit71f70112b2484e45b332fd7f2da137145aa05e9d (patch)
tree84353c0f8e1fc09d07e3ffa887ae8bb37dd02112 /firmware/powermgmt.c
parent9ee396b846a923a415d023be537cf5a2fc3bb78f (diff)
downloadrockbox-71f70112b2484e45b332fd7f2da137145aa05e9d.tar.gz
rockbox-71f70112b2484e45b332fd7f2da137145aa05e9d.tar.bz2
rockbox-71f70112b2484e45b332fd7f2da137145aa05e9d.zip
Add set_sleeptimer_duration function in minutes
Make set_sleep_timer a static function and only call set_sleeptimer_duration externally, which is always called with minutes values. Change-Id: I985308bf014e354f91c47a0b2bf62f4f5a591919 Reviewed-on: http://gerrit.rockbox.org/327 Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r--firmware/powermgmt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 379b91ca13..b6d4b9f66e 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -60,6 +60,7 @@ int last_sent_battery_level = 100;
/* battery level (0-100%) */
int battery_percent = -1;
void send_battery_level_event(void);
+static void set_sleep_timer(int seconds);
static bool sleeptimer_active = false;
static long sleeptimer_endtick;
@@ -863,7 +864,12 @@ void send_battery_level_event(void)
}
}
-void set_sleep_timer(int seconds)
+void set_sleeptimer_duration(int minutes)
+{
+ set_sleep_timer(minutes * 60);
+}
+
+static void set_sleep_timer(int seconds)
{
if (seconds) {
sleeptimer_active = true;