초기커밋

This commit is contained in:
2025-05-01 07:20:41 +09:00
commit 98bb2e3c5c
2747 changed files with 646947 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
using ServerCore; using ServerBase;
using System.Runtime.CompilerServices;
namespace ServerBase;
public class TimeEventForMinuteTicker : EntityTicker
{
public TimeEventForMinuteTicker(double onTickIntervalMilliseconds, CancellationTokenSource? cts)
: base(EntityType.TimeEventTicker, onTickIntervalMilliseconds, cts)
{
}
public override async Task onTaskTick()
{
var date = DateTimeHelper.Current;
// 1. 00 Second 체크 Delay
if (date.Second != 0)
{
var check = ConstValue.default_1_min_to_sec * ConstValue.default_1_sec_to_milisec;
var current = date.Second * ConstValue.default_1_sec_to_milisec + date.Millisecond;
await Task.Delay(check - current);
}
// 2. task 실행 ( fire and forget )
_ = Task.Run(() => DailyTimeEventManager.Instance.runTimeEvents());
await Task.CompletedTask;
}
}