mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-27 07:37:33 +00:00
(timer-set-time-with-usecs): Fix documentation. Simplify extraction of time data.
This commit is contained in:
parent
a8fda94500
commit
120034b309
@ -1,3 +1,8 @@
|
|||||||
|
2002-07-12 Juanma Barranquero <lektu@terra.es>
|
||||||
|
|
||||||
|
* timer.el (timer-set-time-with-usecs): Fix documentation. Simplify
|
||||||
|
extraction of time data.
|
||||||
|
|
||||||
2002-07-12 John Paul Wallington <jpw@shootybangbang.com>
|
2002-07-12 John Paul Wallington <jpw@shootybangbang.com>
|
||||||
|
|
||||||
* help-fns.el (describe-variable): Mention if the variable is an
|
* help-fns.el (describe-variable): Mention if the variable is an
|
||||||
|
@ -137,14 +137,15 @@ SECS may be a fraction."
|
|||||||
(aset timer 3 (or (nth 2 time) 0))))
|
(aset timer 3 (or (nth 2 time) 0))))
|
||||||
|
|
||||||
(defun timer-set-time-with-usecs (timer time usecs &optional delta)
|
(defun timer-set-time-with-usecs (timer time usecs &optional delta)
|
||||||
"Set the trigger time of TIMER to TIME.
|
"Set the trigger time of TIMER to TIME plus USECS.
|
||||||
TIME must be in the internal format returned by, e.g., `current-time'.
|
TIME must be in the internal format returned by, e.g., `current-time'.
|
||||||
If optional third argument DELTA is a non-zero integer, make the timer
|
The microsecond count from TIME is ignored, and USECS is used instead.
|
||||||
|
If optional fourth argument DELTA is a non-zero integer, make the timer
|
||||||
fire repeatedly that many seconds apart."
|
fire repeatedly that many seconds apart."
|
||||||
(or (timerp timer)
|
(or (timerp timer)
|
||||||
(error "Invalid timer"))
|
(error "Invalid timer"))
|
||||||
(aset timer 1 (car time))
|
(aset timer 1 (nth 0 time))
|
||||||
(aset timer 2 (if (consp (cdr time)) (car (cdr time)) (cdr time)))
|
(aset timer 2 (nth 1 time))
|
||||||
(aset timer 3 usecs)
|
(aset timer 3 usecs)
|
||||||
(aset timer 4 (and (numberp delta) (> delta 0) delta))
|
(aset timer 4 (and (numberp delta) (> delta 0) delta))
|
||||||
timer)
|
timer)
|
||||||
|
Loading…
Reference in New Issue
Block a user