ex:constant main = create( wxFrame, {0,-1,"Timer"}), timer = create( wxTimer, {main})
procedure on_timer( atom this, atom event ) puts(1,"Timer\n") end procedure
-- NOTE: using the parent to identify the timer. set_event_handler( main, -1, wxEVT_TIMER, routine_id("on_timer"))
-- set the timer to fire every 1 second, repeatedly start_timer( timer, 1000, 0 )
wxMain( main )
Set the timer to fire every msec millisecond ( 1000msec = 1sec ). oneshot indicates whether the timer should stop firing after the first time, or fire repeatedly until stop_timer() is called.
See Also: stop_timer
Stops a timer from firing until reset using start_timer().
See Also: start_timer