Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!rodan.acs.syr.edu!isr From: isr@rodan.acs.syr.edu (Michael S. Schechter - ISR group account) Newsgroups: comp.sys.mac.programmer Subject: Re: Timer Message-ID: <1990Oct22.134917.5562@rodan.acs.syr.edu> Date: 22 Oct 90 13:49:17 GMT References: <10719.271f09c1@amherst.bitnet> Organization: Institute for Sensory Research Lines: 21 In article <10719.271f09c1@amherst.bitnet> mbabramowicz@amherst.bitnet writes: > Time = Ticks(); > for (count = 0; (count<= 2000) && (!Button()); count++); > Time = Ticks() - Time; > oneTick = 2000/Time; > >The variable oneTick is now set equal to the number of times you go through >the for loop in a Tick. This loop has variable time to execute due to interupts occurring during it. And, yes, these interrupts take up of **lots** of time at times. Even if a machine is sitting idle you still have some interrupts in there taking up unknown amount of time. (on a II, there's something that takes up 80-120usec and happens at least a few times every second) and that's without even worrying about what happens when the mouse moves (more interupts) -- Mike Schechter, Computer Engineer,Institute Sensory Research, Syracuse Univ. InterNet: Mike_Schechter@isr.syr.edu isr@rodan.syr.edu Bitnet: SENSORY@SUNRISE