Photon Fusion 2.0.3

Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
Timer Struct Reference

Represents a high-resolution timer. More...

Public Member Functions

long GetDelta ()
 
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 Timer StartNew ()
 Creates and starts a new timer. More...
 

Public Attributes

long _elapsed
 
byte _running
 
long _start
 

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

◆ Reset()

void Reset ( )

Resets the timer to its initial state.

◆ Restart()

void Restart ( )

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

◆ Start()

void Start ( )

Starts the timer if it is not already running.

◆ StartNew()

static Timer StartNew ( )
static

Creates and starts a new timer.

Returns
A new instance of the Timer struct.

◆ Stop()

void Stop ( )

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

Property Documentation

◆ ElapsedInMilliseconds

double ElapsedInMilliseconds
get

Gets the elapsed time in milliseconds.

◆ ElapsedInSeconds

double ElapsedInSeconds
get

Gets the elapsed time in seconds.

◆ ElapsedInTicks

long? ElapsedInTicks
get

Gets the elapsed time in ticks.

◆ IsRunning

bool IsRunning
get

Gets a value indicating whether the timer is running.