C# Class FlatRedBall.TimeManager

Afficher le fichier Open project: vchelaru/FlatRedBall

Méthodes publiques

Свойство Type Description
CurrentTime double

Méthodes publiques

Méthode Description
CreateXmlSumTimeSectionReport ( string fileName ) : void
GetPersistentTimedSections ( ) : string
GetSumTimedSections ( ) : string
GetTimedSectionList ( ) : List
GetTimedSections ( bool showTotal ) : string
Initialize ( ) : void

Allows the game component to perform any initialization it needs to before starting to run. This is where it can query for any required services and load content.

InitializeStopwatch ( ) : void
PersistentTimeSection ( string label ) : void
SecondsSince ( double absoluteTime ) : double
StartPersistentTiming ( ) : void
StartSumTiming ( ) : void

Begins Sum Timing

StartSumTiming(); foreach(Sprite sprite in someSpriteArray) { SumTimeRefresh(); PerformSomeFunction(sprite); SumTimeSection("PerformSomeFunction time:"); SumTimeRefresh(); PerformSomeOtherFunction(sprite); SumTimeSection("PerformSomeOtherFunction time:); }

SumTimeRefresh ( ) : void
SumTimeSection ( string label ) : void
TimeSection ( ) : void

Stores an unnamed timed section.

A timed section is the amount of time (in seconds) since the last time either Update or TimeSection has been called. The sections are reset every time Update is called. The sections can be retrieved through the GetTimedSections method. FRB.TimeManager.GetTimedSection

TimeSection ( string label ) : void

Stores an named timed section.

A timed section is the amount of time (in seconds) since the last time either Update or TimeSection has been called. The sections are reset every time Update is called. The sections can be retrieved through the GetTimedSections method. FRB.TimeManager.GetTimedSection

Update ( GameTime time ) : void

Performs every-frame logic to update timing values such as CurrentTime and SecondDifference. If this method is not called, CurrentTime will not advance.

Method Details

CreateXmlSumTimeSectionReport() public static méthode

public static CreateXmlSumTimeSectionReport ( string fileName ) : void
fileName string
Résultat void

GetPersistentTimedSections() public static méthode

public static GetPersistentTimedSections ( ) : string
Résultat string

GetSumTimedSections() public static méthode

public static GetSumTimedSections ( ) : string
Résultat string

GetTimedSectionList() public static méthode

public static GetTimedSectionList ( ) : List
Résultat List

GetTimedSections() public static méthode

public static GetTimedSections ( bool showTotal ) : string
showTotal bool
Résultat string

Initialize() public static méthode

Allows the game component to perform any initialization it needs to before starting to run. This is where it can query for any required services and load content.
public static Initialize ( ) : void
Résultat void

InitializeStopwatch() public static méthode

public static InitializeStopwatch ( ) : void
Résultat void

PersistentTimeSection() public static méthode

public static PersistentTimeSection ( string label ) : void
label string
Résultat void

SecondsSince() public static méthode

public static SecondsSince ( double absoluteTime ) : double
absoluteTime double
Résultat double

StartPersistentTiming() public static méthode

public static StartPersistentTiming ( ) : void
Résultat void

StartSumTiming() public static méthode

Begins Sum Timing
StartSumTiming(); foreach(Sprite sprite in someSpriteArray) { SumTimeRefresh(); PerformSomeFunction(sprite); SumTimeSection("PerformSomeFunction time:"); SumTimeRefresh(); PerformSomeOtherFunction(sprite); SumTimeSection("PerformSomeOtherFunction time:); }
public static StartSumTiming ( ) : void
Résultat void

SumTimeRefresh() public static méthode

public static SumTimeRefresh ( ) : void
Résultat void

SumTimeSection() public static méthode

public static SumTimeSection ( string label ) : void
label string
Résultat void

TimeSection() public static méthode

Stores an unnamed timed section.
A timed section is the amount of time (in seconds) since the last time either Update or TimeSection has been called. The sections are reset every time Update is called. The sections can be retrieved through the GetTimedSections method. FRB.TimeManager.GetTimedSection
public static TimeSection ( ) : void
Résultat void

TimeSection() public static méthode

Stores an named timed section.
A timed section is the amount of time (in seconds) since the last time either Update or TimeSection has been called. The sections are reset every time Update is called. The sections can be retrieved through the GetTimedSections method. FRB.TimeManager.GetTimedSection
public static TimeSection ( string label ) : void
label string The label for the timed section.
Résultat void

Update() public static méthode

Performs every-frame logic to update timing values such as CurrentTime and SecondDifference. If this method is not called, CurrentTime will not advance.
public static Update ( GameTime time ) : void
time Microsoft.Xna.Framework.GameTime The GameTime value provided by the XNA Game class.
Résultat void

Property Details

CurrentTime public_oe static_oe property

public static double CurrentTime
Résultat double