emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/wcheck-mode b52fa9d: Simplify/port wcheck--current-idle


From: Paul Eggert
Subject: [elpa] externals/wcheck-mode b52fa9d: Simplify/port wcheck--current-idle-time-seconds
Date: Sat, 11 Dec 2021 21:17:23 -0500 (EST)

branch: externals/wcheck-mode
commit b52fa9dcd75bd9758fffc54f769bcd42a58ef6ba
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]