… | |
… | |
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 |