summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/timer.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2021-10-05 07:50:22 -0700
committerGlenn Morris <rgm@gnu.org>2021-10-05 07:50:22 -0700
commit2dc88a27a46ab1798383483454e45a7d69caa3d0 (patch)
tree23d4b8709c7c3c12f65c97ac4f51b9cc13d47f35 /lisp/emacs-lisp/timer.el
parent6090e0f23e80945641970a6caa3681870b80e7fa (diff)
parent63abe976ce65e42d67730d0577854867bc83e69c (diff)
downloademacs-2dc88a27a46ab1798383483454e45a7d69caa3d0.tar.gz
emacs-2dc88a27a46ab1798383483454e45a7d69caa3d0.tar.bz2
emacs-2dc88a27a46ab1798383483454e45a7d69caa3d0.zip
Merge from origin/emacs-28
63abe976ce (origin/emacs-28) Document minibuffer-default-prompt-forma... b5afbedc90 Backward compatibility option for 'nobreak-char-display' ea1b728a06 ; * lisp/dired.el: Fix typo. 984eafeb98 Unbreak the build after Gnulib update 5946370cd1 Check, whether an FUSE mount has been broken in Tramp 90575a6c0c Disable 'nobreak-char-display' in Eldoc buffers 570e2c9a17 Fix small error in comint-send-input fd7bb31412 Update documentation of search-whitespace-regexp 1f4ced47a1 Fix cc-compat.el syntax error b431f54c1b Mention `seq-uniq' in `delete-dups' documentation 0a7bab689c ; Minor stylistic fixes found by checkdoc e2861e2d08 ; * etc/NEWS: Fix typo. 1a65d49931 Port recent Gnulib changes to MS-Windows 68a256c892 Update from Gnulib 63cb65dcce * Fix mh tests for native comp builds (bug#50975) e606cc6f40 * Fix `batch-native-compile' not to spawn a subprocess 894dfe70da Fix native-compilation build from tarball on Cygwin 2ce5e08058 Remove U+FE0F from script-representative-chars # Conflicts: # etc/NEWS
Diffstat (limited to 'lisp/emacs-lisp/timer.el')
-rw-r--r--lisp/emacs-lisp/timer.el19
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index 382f6bb1fa3..1ef4931b7be 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -125,9 +125,12 @@ of SECS seconds since the epoch. SECS may be a fraction."
(time-convert (cons (- more-ticks (% more-ticks trunc-s-ticks)) hz)))))
(defun timer-relative-time (time secs &optional usecs psecs)
- "Advance TIME by SECS seconds and optionally USECS microseconds
-and PSECS picoseconds. SECS may be either an integer or a
-floating point number."
+ "Advance TIME by SECS seconds.
+
+Optionally also advance it by USECS microseconds and PSECS
+picoseconds.
+
+SECS may be either an integer or a floating point number."
(let ((delta secs))
(if (or usecs psecs)
(setq delta (time-add delta (list 0 0 (or usecs 0) (or psecs 0)))))
@@ -138,9 +141,13 @@ floating point number."
(time-less-p (timer--time t1) (timer--time t2)))
(defun timer-inc-time (timer secs &optional usecs psecs)
- "Increment the time set in TIMER by SECS seconds, USECS microseconds,
-and PSECS picoseconds. SECS may be a fraction. If USECS or PSECS are
-omitted, they are treated as zero."
+ "Increment the time set in TIMER by SECS seconds.
+
+Optionally also increment it by USECS microseconds, and PSECS
+picoseconds. If USECS or PSECS are omitted, they are treated as
+zero.
+
+SECS may be a fraction."
(setf (timer--time timer)
(timer-relative-time (timer--time timer) secs usecs psecs)))