PlayerLoopTimer Class
Namespace: Cysharp.Threading.Tasks
Assembly: cs.temp.dll.dll
public abstract class PlayerLoopTimer : IDisposable, IPlayerLoopItem
Inheritance
System.Object → PlayerLoopTimerMembers
Constructors
Name | Description |
---|---|
PlayerLoopTimer(Boolean, PlayerLoopTiming, CancellationToken, Action<Object>, Object) |
Methods
Name | Description |
---|---|
Create(TimeSpan, Boolean, DelayType, PlayerLoopTiming, CancellationToken, Action<Object>, Object) | |
Dispose() | |
MoveNextCore() | |
ResetCore(Nullable<TimeSpan>) | |
Restart() | Restart(Reset and Start) timer. |
Restart(TimeSpan) | Restart(Reset and Start) and change interval. |
StartNew(TimeSpan, Boolean, DelayType, PlayerLoopTiming, CancellationToken, Action<Object>, Object) | |
Stop() | Stop timer. |
Explicit Interface Implementations
Name | Description |
---|---|
IPlayerLoopItem.MoveNext() |
Constructors
PlayerLoopTimer(Boolean, PlayerLoopTiming, CancellationToken, Action<Object>, Object)
protected PlayerLoopTimer(bool periodic, PlayerLoopTiming playerLoopTiming, CancellationToken cancellationToken, Action<object> timerCallback, object state)
Parameters
periodic
System.BooleanplayerLoopTiming
PlayerLoopTimingcancellationToken
CancellationTokentimerCallback
System.Action<System.Object>state
System.Object
Methods
Create(TimeSpan, Boolean, DelayType, PlayerLoopTiming, CancellationToken, Action<Object>, Object)
public static PlayerLoopTimer Create(TimeSpan interval, bool periodic, DelayType delayType, PlayerLoopTiming playerLoopTiming, CancellationToken cancellationToken, Action<object> timerCallback, object state)
Parameters
interval
System.TimeSpanperiodic
System.BooleandelayType
DelayTypeplayerLoopTiming
PlayerLoopTimingcancellationToken
CancellationTokentimerCallback
System.Action<System.Object>state
System.Object
Returns
Dispose()
public void Dispose()
MoveNextCore()
protected abstract bool MoveNextCore()
Returns
- System.Boolean
ResetCore(Nullable<TimeSpan>)
protected abstract void ResetCore(TimeSpan? newInterval)
Parameters
newInterval
System.Nullable<System.TimeSpan>
Restart()
Restart(Reset and Start) timer.
public void Restart()
Restart(TimeSpan)
Restart(Reset and Start) and change interval.
public void Restart(TimeSpan interval)
Parameters
interval
System.TimeSpan
StartNew(TimeSpan, Boolean, DelayType, PlayerLoopTiming, CancellationToken, Action<Object>, Object)
public static PlayerLoopTimer StartNew(TimeSpan interval, bool periodic, DelayType delayType, PlayerLoopTiming playerLoopTiming, CancellationToken cancellationToken, Action<object> timerCallback, object state)
Parameters
interval
System.TimeSpanperiodic
System.BooleandelayType
DelayTypeplayerLoopTiming
PlayerLoopTimingcancellationToken
CancellationTokentimerCallback
System.Action<System.Object>state
System.Object
Returns
Stop()
Stop timer.
public void Stop()
Explicit Interface Implementations
IPlayerLoopItem.MoveNext()
bool IPlayerLoopItem.MoveNext()
Returns
- System.Boolean
Implements
System.IDisposable