Win32 message loop optimization