Ejemplo n.º 1
0
        private void InitializeFrameTimer()
        {
            TimerCallbackMethod callback = new TimerCallbackMethod(OnNextFrameTimed);

            CallbackHandle = GCHandle.Alloc(callback, GCHandleType.Normal);
            uint userCtx = 0;

            TimerID = timeSetEvent(TimerIntervalMilliseconds, 0, callback, ref userCtx, TIME_CALLBACK_FUNCTION | TIME_KILL_SYNCHRONOUS);
        }
Ejemplo n.º 2
0
 public static extern uint timeSetEvent(uint delay, uint resolution, TimerCallbackMethod callback, ref uint userCtx, uint fuEvent);