Event Loop

The application event loop is started by calling RunEventLoop(). This method will not return until the QuitEventLoop() method is called, or when the last display window has been closed (need links to the API documentation).

PlatformSystem.Instance.RunEventLoop();

Idle Event

When the event loop is running, an idle event handler is fired repeatedly when there are no events to process.

PlatformService.Instance.Idle += new IdleEventHandler(OnIdle);

void OnIdle()
{
   // do update work...
}