Improve timer test diagnostics.

This commit is contained in:
Sönke Ludwig 2016-12-19 22:21:51 +01:00
parent 06bcccd6ac
commit 6ad917493d

View file

@ -29,7 +29,7 @@ void main()
eventDriver.timers.set(tm, 100.msecs, 100.msecs);
void secondTier(TimerID timer) nothrow @safe {
scope (failure) assert(false);
try {
auto dur = Clock.currTime(UTC()) - s_startTime;
s_cnt++;
assert(dur > 100.msecs * s_cnt);
@ -39,6 +39,9 @@ void main()
s_done = true;
eventDriver.core.exit();
} else eventDriver.timers.wait(tm, &secondTier);
} catch (Exception e) {
assert(false, e.msg);
}
}
eventDriver.timers.wait(tm, &secondTier);