public AccurateTimer(Action action, int delay) { this.mAction = action; AccurateTimer.timeBeginPeriod(1); this.mHandler = new AccurateTimer.TimerEventDel(this.TimerCallback); this.mTimerId = AccurateTimer.timeSetEvent(delay, 0, this.mHandler, IntPtr.Zero, 1); }
private static extern int timeSetEvent( int delay, int resolution, AccurateTimer.TimerEventDel handler, IntPtr user, int eventType);