schedule-function-relative |
| &key context marker repeat-interval verbose | [Function] |
Purpose
Schedule a scheduled function a specified number of
seconds from now.
Package :portable-threads
Module :portable-threads
Arguments and values
name-or-scheduled-function | An object (typically a string or a
symbol) naming a currently scheduled scheduled function or a
scheduled-function | |
seconds | A positive integer | |
context | An object (default is nil )
| |
marker | An object (default is nil )
| |
repeat-interval | A positive integer (representing seconds) or
nil (default is nil )
| |
verbose | A generalized boolean
(default is |
Errors
Threads (multiprocessing) is not supported on the
Common Lisp implementation.
Description
If the scheduled-function
If the scheduled-function
scheduled-function
scheduled-function
The optional context object can be specified to replace the invocation
context in the
See also
*schedule-function-verbose*
all-scheduled-functions
make-scheduled-function
restart-scheduled-function-scheduler
schedule-function
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
scheduled-function-scheduler-paused-p
scheduled-function-scheduler-running-p
spawn-periodic-function
unschedule-function
Examples
Schedule a scheduled function that simply prints "Hello!"
> (schedule-function-relative (make-scheduled-function #'(lambda (scheduled-function) (declare (ignore scheduled-function)) (print "Hello!"))) 5) >Schedule a scheduled function that signals a GBBopen
timer-interrupt-event
> (schedule-function-relative (make-scheduled-function #'(lambda (scheduled-function) (declare (ignore scheduled-function)) (signal-event 'timer-interrupt-event))) 30 :repeat-interval 30) >
Schedule a scheduled function that prints an individualized "Hello"
> (schedule-function-relative (make-scheduled-function #'(lambda (scheduled-function) (format t "~&Hello ~a~%" (scheduled-function-context scheduled-function))) :name 'hello :context "Bob") 5 :repeat-interval 3600) >Verbosely change Bob's annoying repeating
"Hello"
> (schedule-function-relative 'hello 10 :context "Lisa" :verbose 't) ;; Unscheduling #<scheduled-function hello [09:46:11]>... ;; Scheduling #<scheduled-function hello [09:46:27]>... >
Note
The form (schedule-function-relative
10)
(schedule-function
scheduled-function
(+ (get-universal-time) 10))
The GBBopen Project
schedule-function-relative |