Equinox Online Help - Language Reference - A to Z

Home

TimedOut

Applies to
Syntaxlogical TimedOut(TimerHandle, Microseconds [, MultiShot]]
Action[Function] Returns true if at least the number of microseconds in Microseconds has elapsed since TimeStart was called on TimerHandle.
ScopeUsable anywhere.
Notes

TimerHandle must be of type handle and must previously have been passed to the TimeStart statement.

If Microseconds is less than zero, the function returns false; if it is zero, the function returns true; positive values are checked against the timer.

If the optional parameter MultiShot is passed as true and the interval has been reached, the function also adds the value of Microseconds to TimerHandle, such that if it is used repeatedly it acts as a multi-shot timer, returning true once for every Microseconds interval.

CategoryTime handling
See Also Now, Timer, Timer64, TimeElapsed, TimeStart
Example

This example repeatedly calls SomeProcedureCall until one second has elapsed

handle t

TimeStart t
repeat
SomeProcedureCall
until TimedOut(t, 1000000)

This example uses a multi-shot timer

handle t
int i, n

PrintDevice ""
TimeStart t

repeat
n += 1

if TimedOut(t, 1000000, 1) then
i += 1
print i, now, Str(n,,,4)
if i = 10 then exit repeat
end if
end repeat