Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How to Run a section of code for a particular amount of time ?

by GrandFather (Saint)
on Nov 11, 2016 at 09:56 UTC ( [id://1175732]=note: print w/replies, xml ) Need Help??


in reply to How to Run a section of code for a particular amount of time ?

The simplest way is just to use time. Something like:

my $end = time + 30; while (time < $end) { ... }
Premature optimization is the root of all job security
  • Comment on Re: How to Run a section of code for a particular amount of time ?
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1175732]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-23 16:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found