ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Impl/Glib.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Impl/Glib.pm (file contents):
Revision 1.25 by root, Fri Jul 17 23:12:20 2009 UTC vs.
Revision 1.26 by root, Wed Jul 29 13:10:58 2009 UTC

63 my ($class, %arg) = @_; 63 my ($class, %arg) = @_;
64 64
65 my $cb = $arg{cb}; 65 my $cb = $arg{cb};
66 my $ival = $arg{interval} * 1000; 66 my $ival = $arg{interval} * 1000;
67 67
68 my $source; $source = add Glib::Timeout $arg{after} * 1000, 68 my $source; $source = add Glib::Timeout $arg{after} < 0 ? 0 : $arg{after} * 1000,
69 $ival ? sub { 69 $ival ? sub {
70 remove Glib::Source $source; 70 remove Glib::Source $source;
71 $source = add Glib::Timeout $ival, sub { &$cb; 1 }; 71 $source = add Glib::Timeout $ival, sub { &$cb; 1 };
72 &$cb; 72 &$cb;
73 0 73 0

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines