Liking cljdoc? Tell your friends :D
Clojure only.

seesaw.timer


timerclj

(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
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close