branch: externals/wcheck-mode commit b52fa9dcd75bd9758fffc54f769bcd42a58ef6ba Author: Paul Eggert <egg...@cs.ucla.edu> Commit: Paul Eggert <egg...@cs.ucla.edu>
Simplify/port wcheck--current-idle-time-seconds Simplify wcheck--current-idle-time-seconds and port it to future versions of Emacs that will use a different timestamp format. --- wcheck-mode.el | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/wcheck-mode.el b/wcheck-mode.el index 40c57c0..74d980a 100644 --- a/wcheck-mode.el +++ b/wcheck-mode.el @@ -2059,14 +2059,7 @@ a (valid) value for the KEY then query the value from (defun wcheck--current-idle-time-seconds () "Return current idle time in seconds. The returned value is a floating point number." - (let* ((idle (or (current-idle-time) - '(0 0 0))) - (high (nth 0 idle)) - (low (nth 1 idle)) - (micros (nth 2 idle))) - (+ (* high 65536) - low - (/ micros 1000000.0)))) + (float-time (or (current-idle-time) 0))) (defun wcheck--combine-overlapping-areas (alist)