ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/example-refresh-hooks
(Generate patch)

Comparing rxvt-unicode/src/perl/example-refresh-hooks (file contents):
Revision 1.1 by root, Tue Jan 3 04:18:47 2006 UTC vs.
Revision 1.2 by root, Wed Jan 18 11:05:09 2006 UTC

6 my ($self) = @_; 6 my ($self) = @_;
7 7
8 # force a refresh every second 8 # force a refresh every second
9 $self->{digital_clock_refresh} = urxvt::timer 9 $self->{digital_clock_refresh} = urxvt::timer
10 ->new 10 ->new
11 ->start (urxvt::NOW) 11 ->start (1 + int urxvt::NOW)
12 ->cb (sub { 12 ->interval (1)
13 $self->{digital_clock_refresh}->start ($self->{digital_clock_refresh}->at + 1);
14 $self->want_refresh; 13 ->cb (sub { $self->want_refresh });
15 });
16 14
17 () 15 ()
18} 16}
19 17
20# before refreshing: replace upper right with the clock display 18# before refreshing: replace upper right with the clock display

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines