History always repeats itself and sometimes that's good. Here's a second chance to be part of it: tmdtc.com
Using Jwt's WTimer
Jwt includes the class WTimer to help you run tasks at regular intervals. Here is a code that updates a text element of the page every second. It simply instanciates a WTimer, and adds a listener to its timeout signal:
(let [ container (WContainerWidget.) layout (WGridLayout.) text (WText. "Hello") timer (WTimer.) ] (doto timer (.setInterval 1000) (-> .timeout (.addListener container (create-listener [ev] (.setText text (str (java.util.Date. (System/currentTimeMillis)) ))))) (.start)) (.addWidget layout text 0 0) (.setLayout container layout) container)
Simple, isn't it?