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

@ -115,7 +115,6 @@ namespace Server.Items
{
m_From = from;
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -80,7 +80,6 @@ namespace Server.Items
{
m_Bonus = bonus;
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -60,7 +60,6 @@ namespace Server.Items
{
m_Owner = owner;
BonusSwingSpeed = bonusSwingSpeed;
Priority = TimerPriority.FiftyMS;
}
public int BonusSwingSpeed { get; }

View file

@ -65,7 +65,6 @@ namespace Server.Items
{
m_Defender = defender;
SwingSpeedReduction = swingSpeedReduction;
Priority = TimerPriority.FiftyMS;
}
public int SwingSpeedReduction { get; }

View file

@ -110,8 +110,6 @@ namespace Server.Items
m_DamageRemaining = totalDamage;
DamagePerTick = (double)totalDamage / 12 + 0.01;
Priority = TimerPriority.TwentyFiveMS;
}
protected override void OnTick()

View file

@ -65,7 +65,6 @@ namespace Server.Items
{
m_Defender = defender;
m_DamageRemaining = totalDamage;
Priority = TimerPriority.TwentyFiveMS;
DamagePerTick = (double)totalDamage / 12 + .01;
}

View file

@ -446,8 +446,6 @@ namespace Server.Items
public WeaponAbilityTimer(Mobile from) : base(TimeSpan.FromSeconds(3.0))
{
m_Mobile = from;
Priority = TimerPriority.TwentyFiveMS;
}
protected override void OnTick()

View file

@ -294,8 +294,6 @@ namespace Server.Items
{
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
m_Mobile.BeginAction<Fists>();
}

View file

@ -62,7 +62,6 @@ namespace Server.Items
public AttackTimer(Mobile player) : base(AttackEffectDuration)
{
m_Player = player;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()
@ -78,7 +77,6 @@ namespace Server.Items
public DefenseTimer(Mobile player) : base(DefenseEffectDuration)
{
m_Player = player;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()