Photon Quantum 2.1.9

Public Member Functions | Static Public Member Functions | Properties | List of all members
Photon.Deterministic.StopwatchTimer Struct Reference

Represents a high-resolution timer. More...

Public Member Functions

void Reset ()
 Resets the timer to its initial state. More...
 
void Restart ()
 Restarts the timer, setting the elapsed time to zero and starting it. More...
 
void Start ()
 Starts the timer if it is not already running. More...
 
void Stop ()
 Stops the timer if it is running and updates the elapsed time. More...
 

Static Public Member Functions

static StopwatchTimer StartNew ()
 Creates and starts a new timer. More...
 

Properties

double ElapsedInMilliseconds [get]
 Gets the elapsed time in milliseconds. More...
 
double ElapsedInSeconds [get]
 Gets the elapsed time in seconds. More...
 
long? ElapsedInTicks [get]
 Gets the elapsed time in ticks. More...
 
bool IsRunning [get]
 Gets a value indicating whether the timer is running. More...
 

Detailed Description

Represents a high-resolution timer.

Member Function Documentation

◆ StartNew()

static StopwatchTimer Photon.Deterministic.StopwatchTimer.StartNew ( )
inlinestatic

Creates and starts a new timer.

Returns
A new instance of the StopwatchTimer struct.

◆ Start()

void Photon.Deterministic.StopwatchTimer.Start ( )
inline

Starts the timer if it is not already running.

◆ Stop()

void Photon.Deterministic.StopwatchTimer.Stop ( )
inline

Stops the timer if it is running and updates the elapsed time.

◆ Reset()

void Photon.Deterministic.StopwatchTimer.Reset ( )
inline

Resets the timer to its initial state.

◆ Restart()

void Photon.Deterministic.StopwatchTimer.Restart ( )
inline

Restarts the timer, setting the elapsed time to zero and starting it.

Property Documentation

◆ ElapsedInTicks

long? Photon.Deterministic.StopwatchTimer.ElapsedInTicks
get

Gets the elapsed time in ticks.

◆ ElapsedInMilliseconds

double Photon.Deterministic.StopwatchTimer.ElapsedInMilliseconds
get

Gets the elapsed time in milliseconds.

◆ ElapsedInSeconds

double Photon.Deterministic.StopwatchTimer.ElapsedInSeconds
get

Gets the elapsed time in seconds.

◆ IsRunning

bool Photon.Deterministic.StopwatchTimer.IsRunning
get

Gets a value indicating whether the timer is running.