in reply to Time::Hires Granularity
I just ran this code on my laptop for 170k prints per second. Note that printing takes a bit of time:
use Time::HiRes 'time'; my $end_secs = 5; my $elapsed = 0; my $start = time(); while ($elapsed < $end_secs) { $elapsed = time() - $start; print "$elapsed\n"; }
Update: Sorry, I forgot why I was posting. I'm using Linux and slightly different code, both of which may make a difference. If my code runs the same as your code on your machine, it's likely a Windows thing, as tye has already pointed out.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Time::Hires Granularity
by pseudosocrates (Sexton) on Dec 04, 2003 at 05:53 UTC | |
by bart (Canon) on Dec 04, 2003 at 22:25 UTC | |
by BrowserUk (Patriarch) on Dec 04, 2003 at 22:58 UTC | |
|
Re: Re: Time::Hires Granularity
by Anonymous Monk on Dec 04, 2003 at 05:42 UTC |