Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!uwm.edu!ux1.cso.uiuc.edu!tank!cps3xx!usenet From: usenet@cps3xx.UUCP (Usenet file owner) Newsgroups: comp.sys.amiga Subject: Re: Lattice C 5.04 bug Message-ID: <5757@cps3xx.UUCP> Date: 11 Dec 89 22:33:55 GMT References: <828@wet.UUCP> <12147@cbnewsc.ATT.COM> Reply-To: porkka@frith.UUCP (Joe Porkka) Organization: Michigan State University Lines: 27 >> From article <828@wet.UUCP>, by mcw@wet.UUCP (Martin Warnett): >> work right before being faster makes a difference... Especially in a "PLease waste some time" function :-) > >I was under the impression that "Delay" was a pretty nasty thing to use, that >it stopped the whole system dead while it was delaying or something. >Whatever the reason, I remember seeing posts to the effect of "Don't use >Delay." Anyone remember why? Yes. Bad things happen to the nearest filesystem if you do a Delay(0); This is a bug in the timer.device i believe, something about it having trouble with very short intervals. You get the same effect with WaitForChar(handle,0); So, sllep really ought to be: sleep(n) unsigned n; { if(n==0 || n>(MAXINT/60) ) return; /* No delay, and too big delays are bad things */ Delay (60*n); } Joe Porkka porkka@frith.egr.msu.edu