From 8912151bdceb0dff4b049d5ac1db4aeae6761ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Wed, 16 Aug 2023 17:09:02 +0200 Subject: [PATCH] fix: pausing of timers/pomodoro not working --- src/timer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timer.rs b/src/timer.rs index c8226fa..af2ca46 100644 --- a/src/timer.rs +++ b/src/timer.rs @@ -34,7 +34,7 @@ impl Timer { /// Returns `true` if this [`Timer`] has expired pub fn is_expired(&self) -> bool { - let expired = Instant::now() - self.start > self.duration; + let expired = self.remaining().is_zero(); if expired { self.handle_expiration() };