diff --git a/monkey/infection_monkey/utils/timer.py b/monkey/infection_monkey/utils/timer.py index 597eb6020..2ed17d551 100644 --- a/monkey/infection_monkey/utils/timer.py +++ b/monkey/infection_monkey/utils/timer.py @@ -36,7 +36,7 @@ class Timer: :rtype: float """ time_remaining = self._timeout_sec - (time.time() - self._start_time) - return time_remaining if time_remaining > 0 else 0 + return max(time_remaining, 0) def reset(self): """