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

(jptxs) Re: how long does for(1..$n) take?

by jptxs (Curate)
on Feb 16, 2001 at 04:52 UTC ( [id://58759]=note: print w/replies, xml ) Need Help??


in reply to Re: how long does for(1..$n) take?
in thread how long does for(1..$n) take?

sleep won't do it. I want it to actually *do* something for that period of time. Actually, i want it to spike CPU for that period of time, so sleep is quite unsuited to that =)
"A man's maturity -- consists in having found again the seriousness one had as a child, at play." --Nietzsche

Replies are listed 'Best First'.
Re: (jptxs) Re: how long does for(1..$n) take?
by kschwab (Vicar) on Feb 16, 2001 at 06:31 UTC
    alarm(), as suggested earlier, will work just fine. It sounds as though you are building some sort of test suite, though.

    In that case, to keep it modular, it may make sense to fork a child and have the parent sleep(60) then kill the child.

    Update: This also has the advantage of returning all the memory back to the OS after your malloc() fest. TIMTOWTDI

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-25 17:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found