1. Re[2]: sleep() standard function
- Posted by akusaya at gmx.net Aug 19, 2006
- 517 views
> I agree. I ran into this problem recently too. In the meantime I've been using > this procedure: > -- Waits for a specific amount of time passed to it in seconds > global procedure wait(atom seconds) > atom start_time > start_time = time() > if integer(seconds) then > sleep(seconds) > else -- a floating point number > while time() - start_time < seconds do -- Nothing > -- Busy loop until `seconds` have elapsed > end while > end if > end procedure -- wait But laptop users will be angry. If you use windows, use Sleep in kernel32.
2. Re: Re[2]: sleep() standard function
- Posted by D. Newhall <derek_newhall at yahoo.com> Aug 19, 2006
- 518 views
akusaya wrote: > > > But laptop users will be angry. > > If you use windows, use Sleep in kernel32. Why would laptop users be angry?
3. Re: Re[2]: sleep() standard function
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Aug 19, 2006
- 513 views
On Sat, 19 Aug 2006 10:36:49 +0800, aku saya <akusaya at gmx.net> wrote: >But laptop users will be angry. > >If you use windows, use Sleep in kernel32. Aye. As Kat said, I think (I just deleted the message, sorry), Sleep(0) will relinquish the timeslice, whereas Sleep(-1) is a bit more permanent (until a mouse message or similar, I think). Regards, Pete