wxRuby Documentation Home

# Wx::TimerEvent

TimerEvent object is passed to the event handler of timer events.

For example:

class MyFrame : public Frame { public: … void OnTimer(TimerEvent& event); private: Timer m_timer; }; BEGIN_EVENT_TABLE(MyFrame, Frame) EVT_TIMER(TIMER_ID, MyFrame::OnTimer) END_EVENT_TABLE() MyFrame::MyFrame() : m_timer(this, TIMER_ID) { m_timer.Start(1000); // 1 second interval } void MyFrame::OnTimer(TimerEvent& event) { // do whatever you want to do every second here }

## Derived from

Event

## See also

Timer

## Methods

- TimerEvent#get_interval

### TimerEvent#get_interval

Integer get_interval()

Returns the interval of the timer which generated this event.

[This page automatically generated from the Textile source at 2023-06-09 00:45:33 +0000]