delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/20/04:39:36

Date: Sun, 20 Dec 1998 11:39:44 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: ADAM SCHROTENBOER <a DOT j DOT schrotenboer AT usa DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: [Re: cpu eater]
In-Reply-To: <19981218134712.25514.qmail@www0s.netaddress.usa.net>
Message-ID: <Pine.SUN.3.91.981220113913.27996R-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On 18 Dec 1998, ADAM SCHROTENBOER wrote:

> If you want to release the time slice, write your own sleep function.
> 
> Maybe something like this:
> 
> void sleep(int msec)
> {
>   clock(); //Can't remember which fxn to use
>   do
>     _dpmi_yield();
>   while(!(clock()>=msec));
> }

Funny, that is exactly what `sleep' in the DJGPP library already
does.  If the library version doesn't succeed in yielding its time
slice, neithir will the above.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019