Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Microsecond time in 32 bits

by gam3 (Curate)
on Feb 05, 2010 at 01:17 UTC ( #821485=CUFP: print w/ replies, xml ) Need Help??

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.

Comment on Microsecond time in 32 bits
Download Code
Re: Microsecond time in 32 bits
by zentara (Archbishop) on Feb 05, 2010 at 12:46 UTC
    not give you a base 10 number thought

    ... thats good because us aliens prefer base85 :-)

    based on the title, and what the code actually does, shouldn't this be moved to the Poetry Section, and stored under Absurd Realism


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://821485]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2014-07-13 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (248 votes), past polls