Simple script to multiply time by 1000 on 32 bit computer
and return a hex string.
my $time = time(); my $time_l = $time & 0x1ff; my $time_h = ($time >> 9); # n > 7 and n mod 3 == 0 $time_h *= 125; $time_l *= 125; # 1000 = 2^3 * 5^3 printf "x %x%03x\n", $time_h + ($time_l >> 9), ($time_l & 0x1ff) << 3;
-- gam3
A picture is worth a thousand words, but takes 200K.
A picture is worth a thousand words, but takes 200K.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Microsecond time in 32 bits
by zentara (Archbishop) on Feb 05, 2010 at 12:46 UTC |
Back to
Cool Uses for Perl