From 0122e665db31ee06c66af9a6ed0b6e041ac16c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Sat, 14 Mar 2020 18:38:47 +0100 Subject: [PATCH] Fix contract for Timer.rearm. --- source/vibe/core/core.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/vibe/core/core.d b/source/vibe/core/core.d index ee507a2..543ed2b 100644 --- a/source/vibe/core/core.d +++ b/source/vibe/core/core.d @@ -1145,7 +1145,7 @@ struct Timer { /** Resets the timer to the specified timeout */ void rearm(Duration dur, bool periodic = false) nothrow - in { assert(dur > 0.seconds, "Negative timer duration specified."); } + in { assert(dur >= 0.seconds, "Negative timer duration specified."); } body { m_driver.timers.set(m_id, dur, periodic ? dur : 0.seconds); } /** Resets the timer and avoids any firing.