[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Clock



Don't know much about MacPerl (yet :) but I know something about time. I
believe hand[0] should be $secs_today/216000, not 21600. Maybe that's
why the time is wonky. Or maybe I just don't understand what's going
on.  :)

Just my 2 cents.

Geoff Kinnel

Kevin Reid wrote:
> 
> #!perl -w
> 
>     $tstr = scalar localtime;
>     $secs_today = timegm(localtime) % 86400;
>     $hands[0]{ang} = $secs_today / 21600 * $pi2;
>     $hands[1]{ang} = $secs_today / 3600 * $pi2;
>     $hands[2]{ang} = $secs_today / 60 * $pi2;

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch