Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: How to pause 10ms in perl

by premchai21 (Curate)
on Jan 25, 2005 at 19:28 UTC ( #425010=note: print w/replies, xml ) Need Help??

in reply to How to pause 10ms in perl

From the docs for sleep (with minor reformatting):

For delays of finer granularity, you may use Perl's syscall interface to access setitimer(2) if your system supports it, or else see select above. The Time::HiRes module (from CPAN, and starting from Perl 5.8 part of the standard distribution) may also help.

Following the reference to select, we find:

You can effect a sleep of 250 milliseconds this way:

select(undef, undef, undef, 0.25);

Note that whether select gets restarted after signals (say, SIGALRM) is implementation-dependent.

Please try reading the perldocs before asking questions here.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://425010]
[james28909]: ok, i think im going to dive on into OO. i need to keep track of users in a program i have and the easiest way seems to be OO. does anyone have a good site that they knowof for someone wanting to start in O programming?
[karlgoethebier]: james28909: http://modernperlb modern_perl_2016/ 07-object-oriented -perl.html# T2JqZWN0cw

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (14)
As of 2017-05-25 16:07 GMT
Find Nodes?
    Voting Booth?