Table of Contents

Class SchedulerSystem

Namespace
Framework.Systems.Time.Scheduler
Assembly
Assembly-CSharp.dll

ISchedulerSystem 구현체. UniTask.Delay 기반 지연/반복 실행.

public class SchedulerSystem : ISchedulerSystem
Inheritance
object
SchedulerSystem
Implements

Remarks

Cancel(id) 호출 시 내부 HashSet에 기록하고, 다음 대기 완료 후 액션 실행 전 확인해 중단한다. CancellationToken 취소와 Cancel(id) 두 경로로 모두 중단 가능. 취소된 id는 실행 후 HashSet에서 제거되어 재사용 가능. ForgetWithLog()로 OperationCanceledException 이외 예외만 로그 출력.

Methods

Cancel(ScheduleId)

특정 스케줄 취소.

public void Cancel(ScheduleId id)

Parameters

id ScheduleId

취소할 스케줄 ID.

CancelAll()

모든 스케줄 취소.

public void CancelAll()

Delay(float, Action, CancellationToken)

지정 시간 후 1회 실행.

public ScheduleId Delay(float time, Action action, CancellationToken ct = default)

Parameters

time float

지연 시간(초).

action Action

실행할 액션.

ct CancellationToken

취소 신호.

Returns

ScheduleId

취소에 사용할 ScheduleId.

Repeat(float, Action, CancellationToken)

지정 간격으로 반복 실행. ct 취소 또는 Cancel 호출 시 중단.

public ScheduleId Repeat(float interval, Action action, CancellationToken ct = default)

Parameters

interval float

반복 간격(초).

action Action

반복 실행할 액션.

ct CancellationToken

취소 신호.

Returns

ScheduleId

취소에 사용할 ScheduleId.