[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/el-job d045f9a390 045/143: Switch most uses of time-conver
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/el-job d045f9a390 045/143: Switch most uses of time-convert to current-time |
Date: |
Fri, 21 Mar 2025 19:00:27 -0400 (EDT) |
branch: elpa/el-job
commit d045f9a390d0f8e26f22ba39339a67c00d1f35b6
Author: Martin Edström <meedstrom91@gmail.com>
Commit: Martin Edström <meedstrom91@gmail.com>
Switch most uses of time-convert to current-time
---
el-job-child.el | 15 +++++----------
el-job.el | 8 ++++----
2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/el-job-child.el b/el-job-child.el
index 58543040e4..c3c5611e00 100644
--- a/el-job-child.el
+++ b/el-job-child.el
@@ -21,12 +21,6 @@
;;; Code:
-;; We use `time-convert' instead of `current-time' because
-;; 1. (TICKS . HZ) is fewer cons cells than (HIGH LOW USEC PSEC)
-;; 2. (TICKS . HZ) will be future default
-;; 3. If we used `current-time', we may have to inject `current-time-list'
-;; to be sure about behavior
-
(defun el-job-child--zip (metalist1 metalist2)
"Destructively zip two alists into one.
Like the Dash expression \(-zip-with #\\='nconc list1 list2).
@@ -71,21 +65,22 @@ add that information to the final return value."
(while-let ((input (read-minibuffer "")))
(when (eq input 'die)
(throw 'die nil))
- (let (item start output meta results)
+ (let ((current-time-list nil) ;; Fewer cons cells
+ item start output meta results)
(if input
(while input
(setq item (pop input))
- (setq start (time-convert nil t))
+ (setq start (current-time))
(setq output (funcall func item))
(push (time-since start) meta)
- ;; May affect the durations erratically, so do this step after.
+ ;; May affect the durations erratically, so do this step now
after benchmarks done.
(setq results (el-job-child--zip output results)))
(funcall func))
;; Ensure durations are in same order that ITEMS came in, letting us
;; associate which with which just by index.
(setq meta (nreverse meta))
;; Timestamp the finish-time. Will be the very `car' of the metadata.
- (push (time-convert nil t) meta)
+ (push (current-time) meta)
(let ((print-length nil)
(print-level nil)
;; Even though we had set :coding 'utf-8-emacs-unix in the
diff --git a/el-job.el b/el-job.el
index 5a6ecf03f7..3374f8103c 100644
--- a/el-job.el
+++ b/el-job.el
@@ -354,7 +354,7 @@ with one character of your choosing, such as a dot."
(ready nil :documentation "Processes ready for input. Becomes nil
permanently if METHOD is `reap'.")
(busy nil :documentation "Processes that have not yet returned output.")
stderr
- (timestamps (list :accept-launch-request (time-convert nil t)))
+ (timestamps (list :accept-launch-request (current-time)))
(poll-timer (timer-create))
(timeout (timer-create))
finish-times
@@ -633,7 +633,7 @@ should trigger `el-job--receive'."
(when (eq .method 'reap)
(process-send-string proc "die\n"))))))
(setf .queue nil)
- (plist-put .timestamps :launched (time-convert nil t))
+ (plist-put .timestamps :launched (current-time))
(setf .timeout (run-with-timer 30 nil #'el-job--timeout .id))
(when (eq .method 'poll)
(cancel-timer .poll-timer)
@@ -671,7 +671,7 @@ or check what is causing FUNCALL to never return.
Processes killed: %S" (truncate (* 2 el-job--global-timeout)) procs)
(mapc #'el-job--kill-quietly procs))
(setq delay (* delay 1.5))
- (timer-set-time timer (time-add delay (time-convert nil t)))
+ (timer-set-time timer (time-add delay (current-time)))
(timer-set-function timer #'el-job--poll (list procs timer delay))
(timer-activate timer))))
@@ -738,7 +738,7 @@ If nil, infer it from the buffer, if process is still
alive."
(car (last (sort .finish-times #'time-less-p))))
;; TODO: Rename this timestamp, I feel it's not intuitive.
;; Maybe :wrapup-begin?
- (plist-put .timestamps :got-all-results (time-convert nil t))
+ (plist-put .timestamps :got-all-results (current-time))
;; Cleanup
(cancel-timer .timeout)
(when .anonymous
- [nongnu] elpa/el-job fbda86f637 002/143: ., (continued)
- [nongnu] elpa/el-job fbda86f637 002/143: ., ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 30cda35042 006/143: Satisfy linters, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 090be5b36d 017/143: fix, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job a5f9e72c17 018/143: Clean, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job c1d9aec762 021/143: Move code around, polish docstrings, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 9af473582e 024/143: Revert mistake (fix org-node issue #71), ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 612338ce61 029/143: Extra safety clause, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job e13a224d7e 040/143: Change default method when fast-read-process-output is nil, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 594dc70c09 037/143: Split function el-job--find-lib, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job d25d41bb56 063/143: Lump commit, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job d045f9a390 045/143: Switch most uses of time-convert to current-time,
ELPA Syncer <=
- [nongnu] elpa/el-job 44ef7d1026 082/143: Revert "Release version 1.0.4", ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job b000549169 078/143: Readme, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 8adb5cc56c 084/143: Readme, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 68297e8d8a 073/143: Release version 1.0.0, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 127b68e005 080/143: Release version 1.0.4, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 3a042190a0 068/143: Internal rename, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job edb0a16b71 046/143: Remove :eval-once, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 0b180cc276 112/143: Comments, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job bbaf49fa17 056/143: Turn an error into polite debug message, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 70bdb8fea5 055/143: Polish, ELPA Syncer, 2025/03/21