GUIKit`
GUIKit`

"Timer"

The functionality provided by GUIKit has been superseded by the interface construction and controls functions native to the built-in Wolfram Language.

Widget["Timer"]

creates a timed action.

Details

  • To use Widget["Timer"], you first need to load GUIKit using Needs["GUIKit`"].
  • Widget["Timer"] is a useful nonuser interface widget that creates a timed action to which you can bind calls. It can be started and stopped, and its "delay" property in units of milliseconds can be changed while it is running.
  • The following properties are available:
  • "delay"the time in milliseconds between events
    "initialDelay"the initial delay in millliseconds before the first event fires
  • The following event is available:
  • "action"the event triggered each time the timer is set
  • The following methods are available:
  • "start"requests that the timer begin firing actions
    "stop"requests that the timer stop firing actions

Examples

open allclose all

Basic Examples  (1)

Create a timer with controls:

Interactive Examples  (1)

Fire a stream of events only when a button is held down for a length of time: