Photon Fusion 2.1.1

Timer Struct Reference

Represents a high-resolution timer. More...

Public Member Functions

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

Static Public Member Functions

static Timer StartNew ()
 Creates and starts a new timer.

Properties

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

Detailed Description

Represents a high-resolution timer.

Member Function Documentation

◆ StartNew()

Timer StartNew ( )
static

Creates and starts a new timer.

Returns
A new instance of the Timer struct.