aboutsummaryrefslogtreecommitdiff
path: root/org-tempus.el
diff options
context:
space:
mode:
Diffstat (limited to 'org-tempus.el')
-rw-r--r--org-tempus.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/org-tempus.el b/org-tempus.el
index f07aa63..ef62e7f 100644
--- a/org-tempus.el
+++ b/org-tempus.el
@@ -636,8 +636,11 @@ A session does not reset when switching tasks within
(org-duration-from-minutes
(/ idle-seconds 60.0)))))
(if (< idle-seconds org-tempus-idle-active-threshold-seconds)
- (setq org-tempus--idle-active-streak
- (+ org-tempus--idle-active-streak org-tempus-idle-check-interval))
+ (when (or (not (numberp since-last))
+ (and (>= since-last org-tempus-idle-check-interval)
+ (<= since-last (* 2 org-tempus-idle-check-interval))))
+ (setq org-tempus--idle-active-streak
+ (+ org-tempus--idle-active-streak org-tempus-idle-check-interval)))
(setq org-tempus--idle-active-streak 0))
(when (and (>= org-tempus--idle-active-streak
org-tempus-idle-active-streak-seconds)
nihil fit ex nihilo