GameTimer class

This class is used to start and stop updating of the FrameworkDispatcher class as part of any XNA updates that are required for XNA library integration. This class is used by the MicrophoneRecorder class and the SoundEffectPlayer class. Here's a simple example:


public class SomeClassThatUsesXnaLibraries
{  
  GameTimer _xnaTimer = new GameTimer();

  public void Start()
  {
    _xnaTimer.Start();

    // Do other work

  }

  public void Stop()
  {
    _xnaTimer.Stop();

    // End other work

  }
}

Last edited Mar 5, 2011 at 7:50 AM by TheADOGuy, version 3

Comments

No comments yet.