Function: dframe-set-timer
dframe-set-timer is a byte-compiled function defined in dframe.el.gz.
Signature
(dframe-set-timer TIMEOUT FN &optional NULL-ON-ERROR)
Documentation
Apply a timer with TIMEOUT, to call FN, or remove a timer if TIMEOUT is nil.
TIMEOUT is the number of seconds until the dframe controlled program timer is called again. When TIMEOUT is nil, turn off all timeouts. This function must be called from the buffer belonging to the program who requested the timer. NULL-ON-ERROR is ignored.
Source Code
;; Defined in /usr/src/emacs/lisp/dframe.el.gz
(defun dframe-set-timer (timeout fn &optional _null-on-error)
"Apply a timer with TIMEOUT, to call FN, or remove a timer if TIMEOUT is nil.
TIMEOUT is the number of seconds until the dframe controlled program
timer is called again. When TIMEOUT is nil, turn off all timeouts.
This function must be called from the buffer belonging to the program
who requested the timer. NULL-ON-ERROR is ignored."
;; First, fix up our list of client functions
(if timeout
(add-to-list 'dframe-client-functions fn)
(setq dframe-client-functions (delete fn dframe-client-functions)))
;; Now decided what to do about the timeout.
(if (or
;; We have a timer, restart the timer with the new time.
timeout
;; We have a timer, an off is requested, and no client
;; functions are left, shut er down.
(and dframe-timer (not timeout) dframe-client-functions))
;; Only call the low level function if we are changing the state.
(dframe-set-timer-internal timeout)))