]> git.eshelyaron.com Git - emacs.git/commitdiff
(timer-set-time-with-usecs): Fix documentation. Simplify extraction of time data.
authorJuanma Barranquero <lekktu@gmail.com>
Fri, 12 Jul 2002 11:51:22 +0000 (11:51 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Fri, 12 Jul 2002 11:51:22 +0000 (11:51 +0000)
lisp/ChangeLog
lisp/timer.el

index 821950a1f9d45e0ee5859ca202543969923efe07..701aacc4aeda4369351a99ac42dcd3fdd07b3f07 100644 (file)
@@ -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  Kenichi Handa  <handa@etl.go.jp>
 
        * files.el (insert-directory): Be sure to bind
        (toplevel): Add completion-list-mode-finish to temp-buffer-show-hook.
 
        * language/european.el ("Polish"): Change sample text.
-       From jsbien@mimuw.edu.pl (Janusz S. Bie\e,Bq\e(B).
+       From jsbien@mimuw.edu.pl (Janusz S. Bie\e$,1 d\e(B).
 
        * progmodes/sh-script.el (sh-indent-line): Add optional PREFIX-ARG
        parameter.
index 3820b57365e45ff3fc6d67d5f2a46b37f2ae1fae..a908f2a822565ec29b8d8f554aa683d8f425616a 100644 (file)
@@ -135,14 +135,15 @@ SECS may be a fraction."
     (aset timer 3 (or (nth 2 time) 0))))
 
 (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'.
-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."
   (or (timerp timer)
       (error "Invalid timer"))
-  (aset timer 1 (car time))
-  (aset timer 2 (if (consp (cdr time)) (car (cdr time)) (cdr time)))
+  (aset timer 1 (nth 0 time))
+  (aset timer 2 (nth 1 time))
   (aset timer 3 usecs)
   (aset timer 4 (and (numberp delta) (> delta 0) delta))
   timer)