new simplified timer. and little other ops

This commit is contained in:
Youmu Liu
2025-11-18 20:39:03 +08:00
parent 81a60d1cfe
commit ece12f2ea7
28 changed files with 2254 additions and 853 deletions
@@ -36,6 +36,8 @@ namespace StgSharp.Timing
public abstract class TimeSourceProviderBase
{
public abstract long Frequency { get; }
protected object SubscribeLock { get; } = new();
public void AddSubscriber(TimeSpanProvider subscriber)
@@ -45,6 +47,8 @@ namespace StgSharp.Timing
}
}
public abstract long GetCurrentTimeSpanTick();
public void RemoveSubscriber(TimeSpanProvider subscriber)
{
lock (SubscribeLock) {