2026-04-24 20:50:13 +08:00
|
|
|
namespace AlicizaX.Timer.Runtime
|
|
|
|
|
{
|
2026-04-27 12:06:09 +08:00
|
|
|
internal static class TimerDebugFlags
|
|
|
|
|
{
|
|
|
|
|
public const byte Running = 1 << 0;
|
|
|
|
|
public const byte Loop = 1 << 1;
|
|
|
|
|
public const byte Unscaled = 1 << 2;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-24 20:50:13 +08:00
|
|
|
internal struct TimerDebugInfo
|
|
|
|
|
{
|
2026-04-27 12:06:09 +08:00
|
|
|
public ulong TimerHandle;
|
2026-04-24 20:50:13 +08:00
|
|
|
public float LeftTime;
|
|
|
|
|
public float Duration;
|
2026-04-27 12:06:09 +08:00
|
|
|
public float Age;
|
|
|
|
|
public byte Flags;
|
2026-04-24 20:50:13 +08:00
|
|
|
}
|
|
|
|
|
|
2026-04-27 11:01:30 +08:00
|
|
|
internal interface ITimerServiceDebug
|
2026-04-24 20:50:13 +08:00
|
|
|
{
|
|
|
|
|
int GetAllTimers(TimerDebugInfo[] results);
|
|
|
|
|
|
|
|
|
|
void GetStatistics(out int activeCount, out int poolCapacity, out int peakActiveCount, out int freeCount);
|
|
|
|
|
|
|
|
|
|
int GetStaleOneShotTimers(TimerDebugInfo[] results);
|
|
|
|
|
}
|
|
|
|
|
}
|