Use a helper function to add milliseconds to timeval structs

This commit is contained in:
Tobias Brunner
2012-10-18 12:25:59 +02:00
parent 2b6088c718
commit eecd41e349
6 changed files with 22 additions and 37 deletions
@@ -75,12 +75,7 @@ static void connectivity_cb(private_kernel_android_net_t *this,
this->mutex->unlock(this->mutex);
return;
}
now.tv_usec += ROAM_DELAY * 1000;
while (now.tv_usec > 1000000)
{
now.tv_sec++;
now.tv_usec -= 1000000;
}
timeval_add_ms(&now, ROAM_DELAY);
this->next_roam = now;
this->mutex->unlock(this->mutex);