Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!ugle.unit.no!ruve.runit.sintef.no!29195 From: 29195@ruve.runit.sintef.no (Gulbrandsen,Arnt) Newsgroups: comp.os.msdos.programmer Subject: Re: Generating delays Message-ID: <1991Mar11.153409.11426@ugle.unit.no> Date: 11 Mar 91 15:26:36 GMT References: <1991Mar7.053927.12273@meadow.uucp> Sender: news@ugle.unit.no Reply-To: 29195@ruve.runit.sintef.no Distribution: comp Organization: University of Trondheim/NTH, Trondheim, Norway Lines: 14 News-Software: VAX/VMS VNEWS 1.3-4 In article <1991Mar7.053927.12273@meadow.uucp>, py@meadow.uucp (Peter Yeung) writes... >A more accurate method is to write a counting loop to count how many times >does it loop when the clock counter advance from x to x+1 and use the >loop count as a timing base for a timing loop which take the same number >of cycles to loop once as the initial counting loop. Yes, this implies >intimate knowledge of the code generated by the compiler or write both >loops in assembler (can be easily done in TC). > NO! That won't work very well with multitaskers like DESQVIEW, which steal cycles but leave the system clock intact. Arnt Gulbrandsen University of Trondheim, Norway 29195@ruve.runit.sintef.no