DataPollManager: Simplify restarting of data poll timer. (#1737)

This commit is contained in:
Abtin Keshavarzian
2017-05-08 14:47:16 -07:00
committed by Jonathan Hui
parent f90e33a4d5
commit 57b081da6d
+1 -10
View File
@@ -329,16 +329,7 @@ void DataPollManager::ScheduleNextPoll(PollPeriodSelector aPollPeriodSelector)
if (mTimer.IsRunning())
{
uint32_t elapsedTime = Timer::GetNow() - mTimer.Gett0();
if (elapsedTime >= mPollPeriod)
{
SendDataPoll();
}
else
{
mTimer.Start(mPollPeriod - elapsedTime);
}
mTimer.StartAt(mTimer.Gett0(), mPollPeriod);
}
else
{