X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Ftimer.c;h=4453aa0781f5ef64bf14e9609959c7a091688d7a;hb=b719810db446244ff708a2f5f08566af67ddab61;hp=31ef176e7e3d750c8867bc94d96d32063494262c;hpb=28989b63f5e3a959557000f21f3891af08be40f7;p=elogind.git diff --git a/src/core/timer.c b/src/core/timer.c index 31ef176e7..4453aa078 100644 --- a/src/core/timer.c +++ b/src/core/timer.c @@ -323,7 +323,7 @@ static void timer_enter_waiting(Timer *t, bool initial) { log_debug_unit(UNIT(t)->id, "%s: Monotonic timer elapses in %s the next time.", UNIT(t)->id, - format_timespan(buf, sizeof(buf), t->next_elapse_monotonic - ts.monotonic)); + format_timespan(buf, sizeof(buf), t->next_elapse_monotonic > ts.monotonic ? t->next_elapse_monotonic - ts.monotonic : 0)); r = unit_watch_timer(UNIT(t), CLOCK_MONOTONIC, false, t->next_elapse_monotonic, &t->monotonic_watch); if (r < 0)