1. Re[2]: sleep() standard function

> 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.

new topic     » topic index » view message » categorize

2. Re: Re[2]: sleep() standard function

akusaya wrote:
> 
> 
> But laptop users will be angry.
> 
> If you use windows, use Sleep in kernel32.

Why would laptop users be angry?

new topic     » goto parent     » topic index » view message » categorize

3. Re: Re[2]: sleep() standard function

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu