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);
 }
 public void Stop()
 {
     AccurateTimer.timeKillEvent(this.mTimerId);
     AccurateTimer.timeEndPeriod(1);
     Thread.Sleep(100);
 }
 public LinearAcceleration(int samples)
 {
     this.mTimer1 = new AccurateTimer(new Action(this.TimerTick1), 1);
     this.samples = samples;
 }
 public LinearAccelerationFromVelocity(int samples)
 {
     this.mTimer1 = new AccurateTimer(new Action(this.TimerTick1), 1);
     this.samples = samples;
     prev         = new Vector3[samples];
 }