ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/simple-overlay-clock
Revision: 1.1
Committed: Mon Jan 2 20:54:45 2006 UTC (18 years, 4 months ago) by root
Branch: MAIN
Log Message:
*** empty log message ***

File Contents

# Content
1 #! perl
2
3 use POSIX ();
4
5 sub on_init {
6 my ($self) = @_;
7
8 $self->{timer} = urxvt::timer
9 ->new
10 ->start (urxvt::NOW)
11 ->cb (sub {
12 my ($timer) = @_;
13 my $time = $timer->at;
14 $timer->start ($time + 1);
15 $self->scr_overlay (-1, 0, POSIX::strftime "%H:%M:%S", localtime $time);
16 });
17
18 ()
19 }
20