From ebe6f1aafbcc4dd27235cce5c73d4c50d986c164 Mon Sep 17 00:00:00 2001 From: Gobinath Date: Thu, 29 Oct 2020 08:49:40 -0400 Subject: [PATCH] Fix idle start time calculation --- safeeyes/plugins/smartpause/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/safeeyes/plugins/smartpause/plugin.py b/safeeyes/plugins/smartpause/plugin.py index 4a06ac7..7cf51c0 100644 --- a/safeeyes/plugins/smartpause/plugin.py +++ b/safeeyes/plugins/smartpause/plugin.py @@ -151,7 +151,7 @@ def __start_idle_monitor(): system_idle_time = __system_idle_time() if system_idle_time >= idle_time and context['state'] == State.WAITING: smart_pause_activated = True - idle_start_time = datetime.datetime.now() + idle_start_time = datetime.datetime.now() - datetime.timedelta(seconds=system_idle_time) logging.info('Pause Safe Eyes due to system idle') disable_safe_eyes(None) elif system_idle_time < idle_time and context['state'] == State.STOPPED and idle_start_time is not None: