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

@ -125,8 +125,6 @@ namespace Server.Spells.Necromancy
m_Caster = caster;
m_Target = target;
m_End = Core.Now + delay;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -69,7 +69,6 @@ namespace Server.Spells.Necromancy
public ExpireTimer(BaseWeapon weapon, TimeSpan delay) : base(delay)
{
m_Weapon = weapon;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()
@ -87,7 +86,6 @@ namespace Server.Spells.Necromancy
public SoundEffectTimer(Mobile m) : base(TimeSpan.FromSeconds(0.75))
{
m_Mobile = m;
Priority = TimerPriority.FiftyMS;
}
protected override void OnTick()

View file

@ -120,7 +120,6 @@ namespace Server.Spells.Necromancy
{
m_Target = target;
m_End = Core.Now + delay;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -95,7 +95,6 @@ namespace Server.Spells.Necromancy
public InternalTimer(Mobile m, double toRestore) : base(TimeSpan.FromSeconds(10.0))
{
Priority = TimerPriority.OneSecond;
m_Mobile = m;
m_ToRestore = (int)toRestore;

View file

@ -142,7 +142,6 @@ namespace Server.Spells.Necromancy
public InternalTimer(Mobile target, Mobile from) : base(TimeSpan.FromSeconds(0.1), TimeSpan.FromSeconds(0.1))
{
Priority = TimerPriority.FiftyMS;
m_Target = target;
m_From = from;