[Gllug] Tomorrow

Chris Ball chris at void.printf.net
Tue Feb 19 23:07:25 UTC 2002


>>>>> "John" == John Hearns <john.hearns at framestore-cfc.com> writes:

    John> Steve Goodwin pointed this one out to me.  Tomorrow is the
    John> 20th of February, 2002!  So where are you going to be at 2
    John> minutes past eight in the evening?

Asleep, if my current sleeping pattern persists.   ;-)

    John> 20:02 20/02 2002
    John> ps. are there any good countdown clocks to use on a PC?

Not that I know of; try this, though.  It's un{scoped,strict}, but that
shouldn't matter:

#!/usr/bin/perl -w
#Print now/then/difference on a cleared screen, every second.
do {
        system('clear'); # clear the screen
        $target = '1014235320'; # 20:02 20/02 2002
        $now = time();
        print "Time now: " . scalar localtime($now) . "\n";
        print "Time then: " . scalar localtime($target) . "\n";
        print "Seconds remaining: " . ($target - $now) . "\n";
        sleep(1);
} while ($target > $now);
# -- end

- Chris.
-- 
$a="printf.net"; Chris Ball | chris at void.$a | www.$a | finger: chris@$a
         "In the beginning there was nothing, which exploded."


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list