pluto: Use time_monotonic() instead of a custom implementation.

This commit is contained in:
Tobias Brunner 2012-03-22 14:10:59 +01:00
parent 8e066237a7
commit 008e2df477
1 changed files with 1 additions and 12 deletions

View File

@ -46,18 +46,7 @@
*/
time_t now(void)
{
static time_t delta = 0
, last_time = 0;
time_t n = time(NULL);
passert(n != (time_t)-1);
if (last_time > n)
{
plog("time moved backwards %ld seconds", (long)(last_time - n));
delta += last_time - n;
}
last_time = n;
return n + delta;
return time_monotonic(NULL);
}
/* This file has the event handling routines. Events are