[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/with-simulated-input 00ed837502 012/134: Standardize on in
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/with-simulated-input 00ed837502 012/134: Standardize on internal Emacs time type |
Date: |
Mon, 10 Jan 2022 22:59:59 -0500 (EST) |
branch: elpa/with-simulated-input
commit 00ed8375024ded71183c7c1102cd72ac06af8de1
Author: Ryan C. Thompson <rct@thompsonclan.org>
Commit: Ryan C. Thompson <rct@thompsonclan.org>
Standardize on internal Emacs time type
This is needed for compatibility with Emacs 24.
---
with-simulated-input.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/with-simulated-input.el b/with-simulated-input.el
index ae3c07558b..6022dc882e 100644
--- a/with-simulated-input.el
+++ b/with-simulated-input.el
@@ -217,8 +217,8 @@ While executing `wsi-simulate-idle-time', this advice
causes the
simulated idle time to be returned instead of the real value."
(if wsi-simulated-idle-time
(setq ad-return-value
- (when (> (float-time wsi-simulated-idle-time) 0)
- (seconds-to-time wsi-simulated-idle-time)))
+ (when (time-less-p (seconds-to-time 0) wsi-simulated-idle-time)
+ wsi-simulated-idle-time))
ad-do-it))
(cl-defun wsi-simulate-idle-time (secs &optional actually-wait)
@@ -235,8 +235,8 @@ overridden to return the current simulated idle time."
"nSeconds of idle time: \nP")
(cl-loop
with already-run-timers = nil
- with stop-time = (float-time secs)
- with wsi-simulated-idle-time = 0.0
+ with stop-time = (seconds-to-time secs)
+ with wsi-simulated-idle-time = (seconds-to-time 0)
;; We have to search `timer-idle-list' from the beginning each time
;; through the loop because each timer that runs might add more
;; timers to the list, and picking up at the same list position
@@ -246,8 +246,10 @@ overridden to return the current simulated idle time."
timer-idle-list))
while next-timer
for previous-idle-time = wsi-simulated-idle-time
- maximize (float-time (timer--time next-timer))
- into wsi-simulated-idle-time
+ if (time-less-p wsi-simulated-idle-time
+ (timer--time next-timer))
+ do (setq wsi-simulated-idle-time
+ (timer--time next-timer))
when actually-wait
do (sleep-for (float-time (time-subtract wsi-simulated-idle-time
previous-idle-time)))
- [nongnu] elpa/with-simulated-input 703fc3c9ec 118/134: Update the docstring for "with-simulated-input", (continued)
- [nongnu] elpa/with-simulated-input 703fc3c9ec 118/134: Update the docstring for "with-simulated-input", ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 73fa2256df 123/134: Move helper function next to macro, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 708051c57f 105/134: Improve error messages for invalid/incomplete KEYS, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input e7cc96e7df 102/134: Update the debug declaration for "with-simulated-input" macro, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 2f54a2550b 117/134: Clean up code for "with-simulated-input" macro, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input a86f35f3b0 100/134: Add tests for un-quoted lists, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 07bdfbe9ab 124/134: Increment version to 3.0, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 670c23e615 004/134: Update minimum Emacs version to 24.4, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input c97f27da20 005/134: Autoload the macro, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 369ca97402 006/134: Fix issues found by package-lint, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 00ed837502 012/134: Standardize on internal Emacs time type,
ELPA Syncer <=
- [nongnu] elpa/with-simulated-input f0dbf2fdd9 017/134: Fix a typo, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 69d91e4b51 025/134: Add a failing test for lexical variable access, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 9efeb236c8 028/134: Version 2.2, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input b0faef361b 027/134: Properly generate lexical closures for lisp actions in KEYS, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 5a0d3f0399 030/134: Version 2.3, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input f089b6ef42 032/134: Add coverage badge, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 3fe99dfdeb 035/134: Fix and update .travis.yml, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 3e68397677 038/134: Fix a typo, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 049c120764 045/134: Extend tests a bit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/with-simulated-input 7b04400315 046/134: Improve documentation, ELPA Syncer, 2022/01/10