comparison lisp/timer.el @ 46399:ded24b27ba96

(timer-set-time, timer-set-time-with-usecs): Fix docstring.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 16 Jul 2002 06:43:06 +0000
parents 534629ca4cc4
children 6d05f3e71417
comparison
equal deleted inserted replaced
46398:77eee86ab97d 46399:ded24b27ba96
43 (and (vectorp object) (= (length object) 8))) 43 (and (vectorp object) (= (length object) 8)))
44 44
45 (defun timer-set-time (timer time &optional delta) 45 (defun timer-set-time (timer time &optional delta)
46 "Set the trigger time of TIMER to TIME. 46 "Set the trigger time of TIMER to TIME.
47 TIME must be in the internal format returned by, e.g., `current-time'. 47 TIME must be in the internal format returned by, e.g., `current-time'.
48 If optional third argument DELTA is a non-zero integer, make the timer 48 If optional third argument DELTA is a positive number, make the timer
49 fire repeatedly that many seconds apart." 49 fire repeatedly that many seconds apart."
50 (or (timerp timer) 50 (or (timerp timer)
51 (error "Invalid timer")) 51 (error "Invalid timer"))
52 (aset timer 1 (car time)) 52 (aset timer 1 (car time))
53 (aset timer 2 (if (consp (cdr time)) (car (cdr time)) (cdr time))) 53 (aset timer 2 (if (consp (cdr time)) (car (cdr time)) (cdr time)))
138 138
139 (defun timer-set-time-with-usecs (timer time usecs &optional delta) 139 (defun timer-set-time-with-usecs (timer time usecs &optional delta)
140 "Set the trigger time of TIMER to TIME plus USECS. 140 "Set the trigger time of TIMER to TIME plus USECS.
141 TIME must be in the internal format returned by, e.g., `current-time'. 141 TIME must be in the internal format returned by, e.g., `current-time'.
142 The microsecond count from TIME is ignored, and USECS is used instead. 142 The microsecond count from TIME is ignored, and USECS is used instead.
143 If optional fourth argument DELTA is a non-zero integer, make the timer 143 If optional fourth argument DELTA is a positive number, make the timer
144 fire repeatedly that many seconds apart." 144 fire repeatedly that many seconds apart."
145 (or (timerp timer) 145 (or (timerp timer)
146 (error "Invalid timer")) 146 (error "Invalid timer"))
147 (aset timer 1 (nth 0 time)) 147 (aset timer 1 (nth 0 time))
148 (aset timer 2 (nth 1 time)) 148 (aset timer 2 (nth 1 time))