DIRECTORY BasicTime USING [GetClockPulses, Pulses, PulsesToMicroseconds]; IntervalTimer: CEDAR DEFINITIONS IMPORTS BasicTime = { Microseconds: TYPE = LONG CARDINAL; Now: PROCEDURE RETURNS[time: Microseconds] = INLINE { RETURN [BasicTime.PulsesToMicroseconds[BasicTime.GetClockPulses[]]]; }; WaitForExpirationTime: PROCEDURE[time: Microseconds]; WaitForExpirationInterval: PROCEDURE[microseconds: INT]; Pulses: TYPE = BasicTime.Pulses; NowInPulses: PROCEDURE RETURNS[time: Pulses] = INLINE { RETURN [BasicTime.GetClockPulses[]]; }; WaitForExpirationTimeInPulses: PROCEDURE[time: Pulses]; WaitForExpirationIntervalInPulses: PROCEDURE[pulses: INT]; TooManyWaiters: ERROR; }. December 27, 1983 2:20 pm, Stewart, Cedar 5 ÆIntervalTimer.mesa Last edited by D. Swinehart, May 15, 1984 1:16:58 pm PDT Last edited by L. Stewart, December 27, 1983 2:20 pm Clients may deal in Microseconds or in Pulses, but are strongly discouraged from using both because the conversions from one to the other are not guaranteed to be invertible. The conversion routines may be found in BasicTime. A process that is executing one of these wait procedures does not consume much system time. But please note that waiting using these routines does not release any monitor locks -- just like Process.Pause! Machine independent timing: This process will run again as soon as possible after time has been reached, returning immediately if that time has already been reached. A convenience. Waits until something close to that many microseconds have elapsed. Machine dependent timing: This is what is returned by ProcessorFace.GetClockPulses and by the RCLK instruction. Its resolution is defined by ProcessorFace.microsecondsPerHundredPulses. This process will run again as soon as possible after time has been reached, returning immediately if that time has already been reached. A convenience. Waits until something close to that many pulses have elapsed. Êe˜J™J™8J™4J˜šÏk ˜ Jšœ œ0˜?—J˜šœœœ ˜6J˜Jšœ®™®J™2J™ÍJ™J™J™Jšœœ˜#J˜šÏnœ œœœ˜5Jšœ>˜DJ˜—J˜šžœ œ˜5J™‰—J˜šžœ œœ˜8JšÏcS™S—J˜J™J˜šœœ˜ JšœÏbœ  œ, *œ™Ÿ—J˜šž œ œœœ˜7Jšœ˜$J˜—J˜šžœ œ˜7J™‰—J˜šž!œ œ œ˜:JšŸ9œŸ™M—J˜Jšžœœ˜—J˜J˜+—…—Ú