Photon Server API
Public Member Functions | Properties | List of all members
ExitGames.Threading.Timer Class Reference

This class is a manager for scheduled callbacks. More...

Public Member Functions

 Timer ()
 Initializes a new instance of the Timer class. More...
 
Guid AddAction (DateTime utcExecutionTime, Action callback)
 Schedules a callback for a specific time. More...
 
void ClearActions ()
 Aborts all timers. More...
 
void ExecuteAction (Action callback)
 Immediately invoks an async callback. More...
 
void RemoveAction (Guid id)
 Removes a scheduled action that has been added with AddAction. More...
 
void Start ()
 Start executing callbacks. More...
 
void Stop ()
 Stops all timers. More...
 

Properties

bool Running [get]
 Gets a value indicating whether Running. More...
 

Detailed Description

This class is a manager for scheduled callbacks.

Constructor & Destructor Documentation

ExitGames.Threading.Timer.Timer ( )
inline

Initializes a new instance of the Timer class.

Member Function Documentation

Guid ExitGames.Threading.Timer.AddAction ( DateTime  utcExecutionTime,
Action  callback 
)
inline

Schedules a callback for a specific time.

Parameters
utcExecutionTimeThe execution time in UTC.
callbackThe callback.
Returns
An ID that can be used to abort the timer with RemoveAction.
void ExitGames.Threading.Timer.ClearActions ( )
inline

Aborts all timers.

void ExitGames.Threading.Timer.ExecuteAction ( Action  callback)
inline

Immediately invoks an async callback.

Parameters
callbackThe callback to invoke.
void ExitGames.Threading.Timer.RemoveAction ( Guid  id)
inline

Removes a scheduled action that has been added with AddAction.

Parameters
idThe action id assigned by AddAction.
void ExitGames.Threading.Timer.Start ( )
inline

Start executing callbacks.

void ExitGames.Threading.Timer.Stop ( )
inline

Stops all timers.

Property Documentation

bool ExitGames.Threading.Timer.Running
get

Gets a value indicating whether Running.