Spooky has asked for the wisdom of the Perl Monks concerning the following question:

I realize Perl is really fast in looping and because of that I need something that would give me fractions of a second in reading/timing loops? Is there something in the Perl libraries/functions that would allow me to get finer increments than just seconds?

Replies are listed 'Best First'.
Re: @timedata in fractions of a second?
by moritz (Cardinal) on Nov 10, 2009 at 18:32 UTC
Re: @timedata in fractions of a second?
by zentara (Cardinal) on Nov 11, 2009 at 12:48 UTC
    see Roll your own Event-loop which will give you milliseconds..... getting into micro and nano seconds on a personal computer, probably is futile..... even getting millisecond differences to mean anything in a program is probably futile....except for the purposes of assigning unique names

    what i'm trying to say is that so called accurate time you get is only the internal clock of the computer being read by the microprocessor..... by the time it can get outputed into a program to do useful things, many variable rate time lapses are introduced, making them less accurate


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