You need to re-read the docs. This line of code:
my $t0 = [gettimeofday];
Is putting two values (seconds and microseconds) into an anonymous array and assigning a reference to that array to $t0. You then pass that reference to localtime() and get strange results.
In reply to Re: converting Time::HiRes
by BrowserUk
in thread converting Time::HiRes
by Lhamo Latso
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |