Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!gamma!mibte!fmsrl7!eecae!nancy!mailrus!tut.cis.ohio-state.edu!im4u!ut-sally!utah-cs!thomson From: thomson@utah-cs.UUCP (Richard A Thomson) Newsgroups: comp.sys.amiga.tech Subject: Re: Frienndly Sleep (not hogging the CPU) Keywords: Sleep Message-ID: <5405@utah-cs.UUCP> Date: 11 Apr 88 06:24:54 GMT References: <662@wolf.UUCP> Reply-To: thomson@cs.utah.edu.UUCP (Richard A Thomson) Organization: University of Utah CS Dept Lines: 24 In article <662@wolf.UUCP> uzun@wolf.UUCP (Roger Uzun) writes: > I was wondering if there was a friendly way for an amiga Process to >Sleep for a period of time (in C). Currently to sleep for say, >1 second I do a > >for(i=0;i<50;i++) > WaitTOF(); > >Is there a better, possibly more precise way of waiting for a period >of time without hogging the CPU. > >Thanks >-Roger There is a DOS routine called Delay() that does exactly what you want. Use the form: Delay(ticks); /* there are 50 ticks per second */ So to get a delay of 1 second, you would use: Delay(50); -- Rich Thomson