This library provides an 'interval' feature for cl-async.
NOTE: This library had merged into cl-async v0.5.4.
(as:with-event-loop ()
(let ((event (asi:interval (lambda ()
(princ "Hi!"))
:time 3)))
(as:delay (lambda () (asi:remove-interval event))
:time 10)))
Sets an interval callback. This returns an interval-event
which can be used for remove-interval
.
See also as:delay.
Syntax wrapper around interval
to make it a bit less annoying to type.
(with-interval (5)
(format t "Five seconds passed! See you soon!~%"))
Cancels repeated action which was set up using interval
.
(let ((event (interval (lambda () (format t "Hi!")) :time 3)))
(remove-interval event))
Copyright (c) 2014 Eitaro Fukamachi ([email protected])
Licensed under the MIT License.