Photon Quantum 3.0.0

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
Quantum.Profiling.QuantumGraphTimer Class Reference

The Quantum graph timer to measure time with a stopwatch. More...

Public Types

enum  EState
 The state of the timer. More...
 

Public Member Functions

 QuantumGraphTimer ()
 Create a new timer. More...
 
 QuantumGraphTimer (int id, string name)
 Create a new timer with an id and a name. More...
 
 QuantumGraphTimer (string name)
 Create a new timer with a name. More...
 
void Combine (QuantumGraphTimer other)
 Combine the timer with another timer. More...
 
float GetLastMilliseconds ()
 Get the milliseconds measured of the last update. More...
 
float GetLastSeconds ()
 Get the seconds measured of the last update. More...
 
float GetPeakMilliseconds ()
 Get the peak milliseconds measured. More...
 
float GetPeakSeconds ()
 Get the peak seconds measured. More...
 
float GetRecentMilliseconds ()
 Get the recent time in milliseconds since the last start. More...
 
float GetRecentSeconds ()
 Get the recent time in seconds since the last start. More...
 
float GetTotalMilliseconds ()
 Get the total time in milliseconds. More...
 
float GetTotalSeconds ()
 Get the total time in seconds. More...
 
void Pause ()
 Pause the timer. More...
 
void Reset ()
 Reset the timer. More...
 
void Restart ()
 Restart the timer. More...
 
void Return ()
 Return the timer to the pool. More...
 
void Start ()
 Start the timer. More...
 
void Stop ()
 Stop the timer. More...
 

Static Public Member Functions

static QuantumGraphTimer Get (bool start=false)
 Create a new timer or get one from the pool. More...
 
static void Return (QuantumGraphTimer timer)
 Return the timer object to the pool. More...
 

Public Attributes

readonly int ID
 The time id More...
 
readonly string Name
 The time name More...
 

Properties

int Counter [get]
 Counts how many time the timer has been updated. More...
 
TimeSpan LastTime [get]
 The time in the last update. More...
 
TimeSpan PeakTime [get]
 The peak time measured. More...
 
TimeSpan RecentTime [get]
 The time after the last start. More...
 
EState State [get]
 Returns the timer state. More...
 
TimeSpan TotalTime [get]
 The total accumulated time. More...
 

Detailed Description

The Quantum graph timer to measure time with a stopwatch.

Member Enumeration Documentation

◆ EState

The state of the timer.

Enumerator
Stopped 

Timer stopped

Running 

Timer running

Paused 

Timer paused

Constructor & Destructor Documentation

◆ QuantumGraphTimer() [1/3]

Quantum.Profiling.QuantumGraphTimer.QuantumGraphTimer ( )
inline

Create a new timer.

◆ QuantumGraphTimer() [2/3]

Quantum.Profiling.QuantumGraphTimer.QuantumGraphTimer ( string  name)
inline

Create a new timer with a name.

Parameters
nameName

◆ QuantumGraphTimer() [3/3]

Quantum.Profiling.QuantumGraphTimer.QuantumGraphTimer ( int  id,
string  name 
)
inline

Create a new timer with an id and a name.

Parameters
idTimer id
nameTimer name

Member Function Documentation

◆ Start()

void Quantum.Profiling.QuantumGraphTimer.Start ( )
inline

Start the timer.

◆ Pause()

void Quantum.Profiling.QuantumGraphTimer.Pause ( )
inline

Pause the timer.

◆ Stop()

void Quantum.Profiling.QuantumGraphTimer.Stop ( )
inline

Stop the timer.

◆ Restart()

void Quantum.Profiling.QuantumGraphTimer.Restart ( )
inline

Restart the timer.

◆ Reset()

void Quantum.Profiling.QuantumGraphTimer.Reset ( )
inline

Reset the timer.

◆ Return() [1/2]

void Quantum.Profiling.QuantumGraphTimer.Return ( )
inline

Return the timer to the pool.

◆ Combine()

void Quantum.Profiling.QuantumGraphTimer.Combine ( QuantumGraphTimer  other)
inline

Combine the timer with another timer.

Parameters
otherOther timer

◆ GetTotalSeconds()

float Quantum.Profiling.QuantumGraphTimer.GetTotalSeconds ( )
inline

Get the total time in seconds.

Returns
Time in seconds

◆ GetTotalMilliseconds()

float Quantum.Profiling.QuantumGraphTimer.GetTotalMilliseconds ( )
inline

Get the total time in milliseconds.

Returns
Time in ms

◆ GetRecentSeconds()

float Quantum.Profiling.QuantumGraphTimer.GetRecentSeconds ( )
inline

Get the recent time in seconds since the last start.

Returns
TIme in seconds

◆ GetRecentMilliseconds()

float Quantum.Profiling.QuantumGraphTimer.GetRecentMilliseconds ( )
inline

Get the recent time in milliseconds since the last start.

Returns
Time in ms

◆ GetPeakSeconds()

float Quantum.Profiling.QuantumGraphTimer.GetPeakSeconds ( )
inline

Get the peak seconds measured.

Returns
Peak seconds

◆ GetPeakMilliseconds()

float Quantum.Profiling.QuantumGraphTimer.GetPeakMilliseconds ( )
inline

Get the peak milliseconds measured.

Returns
Peak ms

◆ GetLastSeconds()

float Quantum.Profiling.QuantumGraphTimer.GetLastSeconds ( )
inline

Get the seconds measured of the last update.

Returns
Time in seconds

◆ GetLastMilliseconds()

float Quantum.Profiling.QuantumGraphTimer.GetLastMilliseconds ( )
inline

Get the milliseconds measured of the last update.

Returns
Time in ms

◆ Get()

static QuantumGraphTimer Quantum.Profiling.QuantumGraphTimer.Get ( bool  start = false)
inlinestatic

Create a new timer or get one from the pool.

Parameters
startSet true to automatically start the timer.
Returns
A timer object

◆ Return() [2/2]

static void Quantum.Profiling.QuantumGraphTimer.Return ( QuantumGraphTimer  timer)
inlinestatic

Return the timer object to the pool.

Parameters
timerTimer

Member Data Documentation

◆ ID

readonly int Quantum.Profiling.QuantumGraphTimer.ID

The time id

◆ Name

readonly string Quantum.Profiling.QuantumGraphTimer.Name

The time name

Property Documentation

◆ State

EState Quantum.Profiling.QuantumGraphTimer.State
get

Returns the timer state.

◆ Counter

int Quantum.Profiling.QuantumGraphTimer.Counter
get

Counts how many time the timer has been updated.

◆ TotalTime

TimeSpan Quantum.Profiling.QuantumGraphTimer.TotalTime
get

The total accumulated time.

◆ RecentTime

TimeSpan Quantum.Profiling.QuantumGraphTimer.RecentTime
get

The time after the last start.

◆ PeakTime

TimeSpan Quantum.Profiling.QuantumGraphTimer.PeakTime
get

The peak time measured.

◆ LastTime

TimeSpan Quantum.Profiling.QuantumGraphTimer.LastTime
get

The time in the last update.