(timer f & {:keys [start? initial-value] :or {start? true} :as opts})Creates a new Swing timer that periodically executes the single-argument function f. The argument is a "state" of the timer. Each time the function is called its previous return value is passed to it. Kind of like (reduce) but spread out over time :) The following options are supported:
:initial-value The first value passed to the handler function. Defaults to nil. :initial-delay Delay, in milliseconds, of first call. Defaults to 0. :delay Delay, in milliseconds, between calls. Defaults to 1000. :repeats? If true, the timer runs forever, otherwise, it's a "one-shot" timer. Defaults to true. :start? Whether to start the timer immediately. Defaults to true.
See http://download.oracle.com/javase/6/docs/api/javax/swing/Timer.html
Creates a new Swing timer that periodically executes the single-argument
function f. The argument is a "state" of the timer. Each time the function
is called its previous return value is passed to it. Kind of like (reduce)
but spread out over time :) The following options are supported:
:initial-value The first value passed to the handler function. Defaults to nil.
:initial-delay Delay, in milliseconds, of first call. Defaults to 0.
:delay Delay, in milliseconds, between calls. Defaults to 1000.
:repeats? If true, the timer runs forever, otherwise, it's a
"one-shot" timer. Defaults to true.
:start? Whether to start the timer immediately. Defaults to true.
See http://download.oracle.com/javase/6/docs/api/javax/swing/Timer.html
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |