1 #############################################################################
2 ## Name: lib/Wx/Timer.pm
3 ## Purpose: Wx::Timer and Wx::TimerRunner
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: Timer.pm 2057 2007-06-18 23:03:00Z mbarbon $
8 ## Copyright: (c) 2001-2002 Mattia Barbon
9 ## Licence: This program is free software; you can redistribute it and/or
10 ## modify it under the same terms as Perl itself
11 #############################################################################
20 @_ == 0 && return Wx::Timer::newDefault( $class, );
21 Wx::_match( @_, $Wx::_wehd_n, 1, 1 ) && return Wx::Timer::newEH( $class, @_ );
22 Wx::_croak Wx::_ovl_error;
25 package Wx::TimerRunner;
31 my $this = { TIMER => shift };
33 if( @_ > 0 ) { $this->{TIMER}->Start( @_ ) }
43 $this->{TIMER}->Stop if $this->{TIMER}->IsRunning;
47 my( $this, $milliseconds, $oneshot ) = @_;
49 $this->{TIMER}->Start( $milliseconds, $oneshot );