DIRECTORY System USING [GetClockPulses, Microseconds, Pulses, PulsesToMicroseconds]; IntervalTimer: CEDAR DEFINITIONS IMPORTS System = { Microseconds: TYPE = System.Microseconds; Now: PROCEDURE RETURNS[time: Microseconds] = INLINE { RETURN [System.PulsesToMicroseconds[System.GetClockPulses[]]]; }; WaitForExpirationTime: PROCEDURE[time: Microseconds]; WaitForExpirationInterval: PROCEDURE[microseconds: INT]; Pulses: TYPE = System.Pulses; NowInPulses: PROCEDURE RETURNS[time: Pulses] = INLINE { RETURN [System.GetClockPulses[]]; }; WaitForExpirationTimeInPulses: PROCEDURE[time: Pulses]; WaitForExpirationIntervalInPulses: PROCEDURE[pulses: INT]; TooManyWaiters: ERROR; }. ìIntervalTimer.mesa Last edited by D. Swinehart, March 4, 1983 9:36 am Last edited by L. Stewart, March 23, 1983 3:00 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 System. 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. Ê^˜J™J™2J™1J˜šÏk ˜ Jšœœ>˜J—J˜šœœœ ˜3J˜Jšœ®™®J™/J™J™J™Jšœœ˜)J˜šÏnœ œœœ˜5Jšœ8˜>J˜—J˜šžœ œ˜5J™‰—J˜šžœ œœ˜8JšÏcS™S—J˜J™J˜šœœ˜JšœÏbœ  œ, *œ™Ÿ—J˜šž œ œœœ˜7Jšœ˜!J˜—J˜šžœ œ˜7J™‰—J˜šž!œ œ œ˜:JšŸ9œŸ™M—J˜Jšžœœ˜—J˜—…—°ú