Do not return negative sleeptimer values
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27774 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
113764d9c0
commit
209020ceb1
1 changed files with 1 additions and 1 deletions
|
@ -218,7 +218,7 @@ void set_sleep_timer(int seconds)
|
|||
|
||||
int get_sleep_timer(void)
|
||||
{
|
||||
if (sleeptimer_active)
|
||||
if (sleeptimer_active && (sleeptimer_endtick >= current_tick))
|
||||
return (sleeptimer_endtick - current_tick) / HZ;
|
||||
else
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue