Class Timer
Represents a timer that executes an action at regular intervals.
Namespace: Evergine.Framework.Services
Assembly: Evergine.Framework.dll
Syntax
public class Timer
Fields
Action
The action to execute when the interval time elapses.
Declaration
public Action Action
Field Value
Type | Description |
---|---|
Action |
InitialInterval
Initial firing interval for this instance.
Declaration
public TimeSpan InitialInterval
Field Value
Type | Description |
---|---|
TimeSpan |
Interval
The time that has passed in this current interval. It is reset to
InitialInterval when it reaches zero unless
Looped is set to true
.
Declaration
public TimeSpan Interval
Field Value
Type | Description |
---|---|
TimeSpan |
Looped
Whether this instance will fire its action once or multiple times.
Declaration
public bool Looped
Field Value
Type | Description |
---|---|
bool |
MarkedToDelete
Marked for deletion.
Declaration
public bool MarkedToDelete
Field Value
Type | Description |
---|---|
bool |
Name
The name of this instance.
Declaration
public string Name
Field Value
Type | Description |
---|---|
string |
Properties
IsPaused
Gets a value indicating whether the timer is paused.
Declaration
public bool IsPaused { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
Pause()
Pauses the timer.
Declaration
public void Pause()
Resume()
Resumes the timer.
Declaration
public void Resume()