UniTask
Show / Hide Table of Contents

PlayerLoopTimer Class

Namespace: Cysharp.Threading.Tasks
Assembly: UniTask.dll
public abstract class PlayerLoopTimer : IDisposable, IPlayerLoopItem
Inheritance
object → PlayerLoopTimer
Implements
IDisposable
IPlayerLoopItem

Members

Constructors

Name Description
PlayerLoopTimer(bool, PlayerLoopTiming, CancellationToken, Action<object>, object)

Methods

Name Description
Create(TimeSpan, bool, DelayType, PlayerLoopTiming, CancellationToken, Action<object>, object)
Dispose()
MoveNextCore()
ResetCore(TimeSpan?)
Restart()
Restart(TimeSpan)
StartNew(TimeSpan, bool, DelayType, PlayerLoopTiming, CancellationToken, Action<object>, object)
Stop()

Constructors

PlayerLoopTimer(bool, PlayerLoopTiming, CancellationToken, Action<object>, object)

protected PlayerLoopTimer(bool periodic, PlayerLoopTiming playerLoopTiming, CancellationToken cancellationToken, Action<object> timerCallback, object state)
Parameters
periodic bool
playerLoopTiming PlayerLoopTiming
cancellationToken CancellationToken
timerCallback Action<object>
state object

Methods

Create(TimeSpan, bool, 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 TimeSpan
periodic bool
delayType DelayType
playerLoopTiming PlayerLoopTiming
cancellationToken CancellationToken
timerCallback Action<object>
state object
Returns
PlayerLoopTimer

Dispose()

public void Dispose()

MoveNextCore()

protected abstract bool MoveNextCore()
Returns
bool

ResetCore(TimeSpan?)

protected abstract void ResetCore(TimeSpan? newInterval)
Parameters
newInterval TimeSpan?

Restart()

public void Restart()

Restart(TimeSpan)

public void Restart(TimeSpan interval)
Parameters
interval TimeSpan

StartNew(TimeSpan, bool, 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 TimeSpan
periodic bool
delayType DelayType
playerLoopTiming PlayerLoopTiming
cancellationToken CancellationToken
timerCallback Action<object>
state object
Returns
PlayerLoopTimer

Stop()

public void Stop()

Implements

IDisposable
IPlayerLoopItem

Extension Methods

CancellationTokenExtensions.AddTo(IDisposable, CancellationToken)
Back to top Copyright © Cysharp, Inc. | Generated by DocFX