HandleEvents

The default behaviour of HandleEvents is now to block (i.e. not return) until an event is dispatched.

In FB4 the default behaviour was to return after every 2 ticks (1 tick = 1/60 s) even when no events occurred. In effect a steam of null events was generated 30 times a second, allowing polling but wasting CPU time. This (typically unwanted) activity could be suppressed by:

poke long event - 8, 0xFFFFFFFF // no null events, thanks

In FB5/FBtoC it is no longer necessary to suppress null events in this way.

The old FB4 behaviour, if required, can be restored as shown:

poke long event - 8, 2 // null events every 2 ticks, like FB4
do
 fn PollRegularlyForSomething
 HandleEvents
until gFBQuit