mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
alarmtimer: add alarm_forward_now
Similar to hrtimer_forward_now, move the expires time forward to an interval from the current time of the associated clock. Change-Id: I73fed223321167507b6eddcb7a57d235ffcfc1be Signed-off-by: Todd Poynor <toddpoynor@google.com>
This commit is contained in:
parent
11e30d5ce1
commit
f76497eb33
2 changed files with 7 additions and 0 deletions
|
@ -50,6 +50,7 @@ int alarm_try_to_cancel(struct alarm *alarm);
|
|||
int alarm_cancel(struct alarm *alarm);
|
||||
|
||||
u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval);
|
||||
u64 alarm_forward_now(struct alarm *alarm, ktime_t interval);
|
||||
|
||||
/*
|
||||
* A alarmtimer is active, when it is enqueued into timerqueue or the
|
||||
|
|
|
@ -409,6 +409,12 @@ u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval)
|
|||
return overrun;
|
||||
}
|
||||
|
||||
u64 alarm_forward_now(struct alarm *alarm, ktime_t interval)
|
||||
{
|
||||
struct alarm_base *base = &alarm_bases[alarm->type];
|
||||
|
||||
return alarm_forward(alarm, base->gettime(), interval);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue