Class Timer
- Namespace
- Fantas
- Assembly
- Fantas.dll
Create timer helper
public sealed class Timer
- Inheritance
-
Timer
- Inherited Members
Properties
Elapsed
Elapsed time since timer started
public TimeSpan Elapsed { get; }
Property Value
ElapsedSeconds
Elapsed seconds since timer started
public double ElapsedSeconds { get; }
Property Value
Name
Timer name
public string Name { get; }
Property Value
StopRequested
Mark timer to end
public bool StopRequested { get; }
Property Value
Methods
CreatePeriodicTimer(string, double, Node, Action<Timer>)
Create a periodic timer that repeats forever
public static Timer CreatePeriodicTimer(string name, double interval, Node target, Action<Timer> tickAction)
Parameters
Returns
CreatePeriodicTimer(string, TimeSpan, Node, Action<Timer>)
Create a periodic timer that repeats forever
public static Timer CreatePeriodicTimer(string name, TimeSpan interval, Node target, Action<Timer> tickAction)
Parameters
Returns
CreateRepeatedTimer(string, double, int, Node, Action<Timer>)
Create a periodic timer that repeats N times
public static Timer CreateRepeatedTimer(string name, double interval, int count, Node target, Action<Timer> tickAction)
Parameters
Returns
CreateRepeatedTimer(string, TimeSpan, int, Node, Action<Timer>)
Create a periodic timer that repeats N times
public static Timer CreateRepeatedTimer(string name, TimeSpan interval, int count, Node target, Action<Timer> tickAction)
Parameters
Returns
CreateSingleTimer(string, double, Node, Action<Timer>)
Create a single trigger timer
public static Timer CreateSingleTimer(string name, double interval, Node target, Action<Timer> tickAction)
Parameters
Returns
Exceptions
CreateSingleTimer(string, TimeSpan, Node, Action<Timer>)
Create a single trigger timer
public static Timer CreateSingleTimer(string name, TimeSpan interval, Node target, Action<Timer> tickAction)
Parameters
Returns
Exceptions
Stop()
Stop a repeated timer
public void Stop()