fix(core): Adds Hashed & Hierarchical Timer Wheel (#655)

- Removes TimerPriority
- Removes TimerThread
- Adds a [Hashed & Hierarchical Timer Wheel](http://www.cs.columbia.edu/~nahum/w6998/papers/ton97-timing-wheels.pdf)
This commit is contained in:
Kamron Batman 2021-07-11 22:42:06 -07:00 • committed by GitHub
parent b99d520019
commit fb915992dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
138 changed files with 468 additions and 802 deletions

View file

@ -42,7 +42,6 @@ namespace Server.Items
public InternalTimer(Item blood) : base(TimeSpan.FromSeconds(5.0))
{
Priority = TimerPriority.OneSecond;
m_Blood = blood;
}

View file

@ -1226,7 +1226,6 @@ namespace Server.Items
public InternalTimer(Corpse c, TimeSpan delay) : base(delay)
{
m_Corpse = c;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()

View file

@ -100,7 +100,6 @@ namespace Server.Items
public InternalTimer(DecayedCorpse c, TimeSpan delay) : base(delay)
{
m_Corpse = c;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()

View file

@ -78,7 +78,6 @@ namespace Server.Items
public FreeTimer(EffectItem item, TimeSpan delay) : base(delay)
{
m_Item = item;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()

View file

@ -79,7 +79,6 @@ namespace Server.Items
public InternalTimer(Item item) : base(TimeSpan.FromSeconds(30.0))
{
m_Item = item;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()

View file

@ -550,8 +550,6 @@ namespace Server.Items
m_Panel = panel;
m_To = to;
m_Step = 0;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -148,7 +148,6 @@ namespace Server.Items
public EmptyTimer(TrashBarrel barrel) : base(TimeSpan.FromMinutes(3.0))
{
m_Barrel = barrel;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()

View file

@ -83,7 +83,6 @@ namespace Server.Items
public SpawnTimer(Item item) : base(TimeSpan.FromSeconds(Utility.RandomMinMax(5, 10)))
{
Priority = TimerPriority.FiftyMS;
m_Item = item;
}