[+] TEngineServer

[+] TEngineServer
This commit is contained in:
ALEXTANG
2023-07-13 17:17:26 +08:00
parent a69f53592e
commit 0c8f3a5f92
790 changed files with 52737 additions and 2533 deletions

View File

@@ -0,0 +1,31 @@
using System;
using TEngine.Core;
#pragma warning disable CS8625
#pragma warning disable CS8618
namespace TEngine
{
public sealed class TimerAction : IDisposable
{
public long Id;
public long Time;
public object Callback;
public TimerType TimerType;
public static TimerAction Create()
{
var timerAction = Pool<TimerAction>.Rent();
timerAction.Id = IdFactory.NextRunTimeId();
return timerAction;
}
public void Dispose()
{
Id = 0;
Time = 0;
Callback = null;
TimerType = TimerType.None;
Pool<TimerAction>.Return(this);
}
}
}