The OpenD Programming Language

ICoreEventLoop.addDelegateOnLoopIteration

Adds a delegate to be called on each loop iteration, called based on the timingFlags.

More...
interface ICoreEventLoop
void
addDelegateOnLoopIteration
(
void delegate
()
dg
,)

Parameters

dg void delegate
()

the delegate to call

timingFlags uint

0: never actually run the function; it can assert error if you pass this 1: run before each loop OS wait call 2: run after each loop OS wait call 3: run both before and after each OS wait call 4: single shot? 8: no-coalesce? (if after was just run, it will skip the before loops unless this flag is set)

Detailed Description

The order in which the delegates are called is undefined and may change with each iteration of the loop. Additionally, when and how many times a loop iterates is undefined; multiple events might be handled by each iteration, or sometimes, nothing will be handled and it woke up spuriously. Your delegates need to be ok with all of this.

Meta