Skip to content

Commit 39fbb62

Browse files
committed
[增加]1. 增加组件代理的暂停和恢复计时器接口
1 parent 5446dd7 commit 39fbb62

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

GameFrameX.Core/Hotfix/Agent/BaseComponentAgent.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,24 @@ public void Unscheduled(long id)
208208
ScheduleIdSet.Remove(id);
209209
}
210210

211+
/// <summary>
212+
/// 暂停定时任务,不再执行
213+
/// </summary>
214+
/// <param name="id">定时任务ID</param>
215+
public void Pause(long id)
216+
{
217+
QuartzTimer.Pause(id);
218+
}
219+
220+
/// <summary>
221+
/// 恢复暂停的定时任务,继续执行
222+
/// </summary>
223+
/// <param name="id">定时任务ID</param>
224+
public void Resume(long id)
225+
{
226+
QuartzTimer.Resume(id);
227+
}
228+
211229
/// <summary>
212230
/// 延迟执行定时任务,在指定的时间点执行一次任务
213231
/// </summary>

0 commit comments

Comments
 (0)