Parent

Methods

Files

Wx::Timer

Class allowing periodic or timed events to be fired

Public Class Methods

after(interval, &block) click to toggle source

Convenience method to trigger a one-off action after interval milliseconds have passed. The action is specified by the passed block. The Timer is owned by the global App object, and is returned by the method.

# File wx/classes/timer.rb, line 7
  def self.after(interval, &block)
    timer = new(Wx::THE_APP, Wx::ID_ANY)
    Wx::THE_APP.evt_timer(timer.get_id, block)
    timer.start(interval, true)
    timer
  end
every(interval, &block) click to toggle source

Convenience method to trigger a repeating action every interval milliseconds. The action is specified by the passed block. The Timer is owned by the global App object, and is returned by the method.

# File wx/classes/timer.rb, line 17
  def self.every(interval, &block)
    timer = new(Wx::THE_APP, Wx::ID_ANY)
    Wx::THE_APP.evt_timer(timer.get_id, block)
    timer.start(interval)
    timer
  end

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.