scheduled-function-repeat-interval |
| [Function] |
Purpose
Return the repeat interval of a scheduled function.
Setf syntax
|
scheduled-function) repeat-interval)
|
Package :portable-threads
Module :portable-threads
Arguments and values
scheduled-function | A scheduled function | |
repeat-interval | A positive integer (representing seconds) or nil |
Returns
The repeat interval of scheduled-function.
See also
all-scheduled-functions
make-scheduled-function
schedule-function
schedule-function-relative
scheduled-function-context
scheduled-function-invocation-time
scheduled-function-marker
scheduled-function-marker-test
scheduled-function-name
scheduled-function-name-test
scheduled-function-repeat-interval
Examples
Display the scheduled-function
> (dolist (scheduled-function (all-scheduled-functions)) (format t "~&;; ~s ~s~%" scheduled-function (scheduled-function-repeat-interval scheduled-function))) ;; #<scheduled-function quitting-time [17:00:00]> 86400 nil >
Define a function to be used as a scheduled function that randomly sets whether to reschedule itself (and at what interval):
(defun complex-function (scheduled-function) (let ((interval (random 100))) (setf (scheduled-function-repeat-interval scheduled-function) (if (plusp interval) ;; repeat 1-99 seconds from now: interval ;; don't repeat 1% of the time: nil))) (do-some-stuff))
The GBBopen Project
scheduled-function-repeat-interval |