Microsoft.Xna.Framework
Class GameTime

java.lang.Object
  extended by Microsoft.Xna.Framework.GameTime

public class GameTime
extends java.lang.Object

Snapshot of the game timing state expressed in values that can be used by variable-step (real time) or fixed-step (game time) games.

Author:
Halofreak1990

Constructor Summary
GameTime()
          Creates a new instance of GameTime.
GameTime(System.TimeSpan totalGameTime, System.TimeSpan elapsedGameTime)
          Creates a new instance of GameTime.
GameTime(System.TimeSpan totalGameTime, System.TimeSpan elapsedGameTime, boolean isRunningSlowly)
          Creates a new instance of GameTime.
 
Method Summary
 System.TimeSpan getElapsedGameTime()
          The amount of elapsed game time since the last update.
 boolean getIsRunningSlowly()
          Gets a value indicating that the game loop is taking longer that its TargetElapsedTime.
 System.TimeSpan getTotalGameTime()
          The amount of game time since the start of the game.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameTime

public GameTime()
Creates a new instance of GameTime.


GameTime

public GameTime(System.TimeSpan totalGameTime,
                System.TimeSpan elapsedGameTime)
Creates a new instance of GameTime.

Parameters:
totalGameTime - The amount of game time since the start of the game.
elapsedGameTime - The amount of elapsed game time since the last update.

GameTime

public GameTime(System.TimeSpan totalGameTime,
                System.TimeSpan elapsedGameTime,
                boolean isRunningSlowly)
Creates a new instance of GameTime.

Parameters:
totalGameTime - The amount of game time since the start of the game.
elapsedGameTime - The amount of elapsed game time since the last update.
isRunningSlowly - Whether the game is running multiple updates this frame.
Method Detail

getElapsedGameTime

public System.TimeSpan getElapsedGameTime()
The amount of elapsed game time since the last update.


getIsRunningSlowly

public boolean getIsRunningSlowly()
Gets a value indicating that the game loop is taking longer that its TargetElapsedTime. In this case, the game loop can be considered to be running too slowly and should do something to "catch up".


getTotalGameTime

public System.TimeSpan getTotalGameTime()
The amount of game time since the start of the game.