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