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:
parent
b99d520019
commit
fb915992dd
138 changed files with 468 additions and 802 deletions
|
|
@ -329,8 +329,6 @@ namespace Server.Spells
|
|||
public SpecialMoveTimer(Mobile from) : base(TimeSpan.FromSeconds(3.0))
|
||||
{
|
||||
m_Mobile = from;
|
||||
|
||||
Priority = TimerPriority.TwentyFiveMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
|
|||
|
|
@ -860,8 +860,6 @@ namespace Server.Spells
|
|||
public AnimTimer(Spell spell, int count) : base(TimeSpan.Zero, AnimateDelay, count)
|
||||
{
|
||||
m_Spell = spell;
|
||||
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
@ -898,8 +896,6 @@ namespace Server.Spells
|
|||
public CastTimer(Spell spell, TimeSpan castDelay) : base(castDelay)
|
||||
{
|
||||
m_Spell = spell;
|
||||
|
||||
Priority = TimerPriority.TwentyFiveMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ namespace Server
|
|||
: base(TimeSpan.FromMinutes(1.0))
|
||||
{
|
||||
m_Mobile = m;
|
||||
|
||||
Priority = TimerPriority.OneSecond;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
@ -1132,8 +1130,6 @@ namespace Server.Spells
|
|||
{
|
||||
m_Spell.StartDelayedDamageContext(target, this);
|
||||
}
|
||||
|
||||
Priority = TimerPriority.TwentyFiveMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
@ -1182,8 +1178,6 @@ namespace Server.Spells
|
|||
{
|
||||
m_Spell.StartDelayedDamageContext(target, this);
|
||||
}
|
||||
|
||||
Priority = TimerPriority.TwentyFiveMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
@ -1455,8 +1449,6 @@ namespace Server.Spells
|
|||
{
|
||||
m_Mobile = from;
|
||||
m_Spell = spell;
|
||||
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ namespace Server.Spells.Bushido
|
|||
public InternalTimer(Mobile m) : base(TimeSpan.FromSeconds(15.0))
|
||||
{
|
||||
m_Mobile = m;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
@ -117,7 +116,6 @@ namespace Server.Spells.Bushido
|
|||
{
|
||||
m_Mobile = m;
|
||||
m_Hits = 15 + m.Skills.Bushido.Fixed * m.Skills.Bushido.Fixed / 57600;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
|
|||
|
|
@ -231,7 +231,6 @@ namespace Server.Spells.Bushido
|
|||
: base(delay)
|
||||
{
|
||||
m_Mobile = m;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
|
|||
|
|
@ -106,7 +106,6 @@ namespace Server.Spells.Chivalry
|
|||
public ExpireTimer(BaseWeapon weapon, TimeSpan delay) : base(delay)
|
||||
{
|
||||
m_Weapon = weapon;
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
|
|||
|
|
@ -233,8 +233,6 @@ namespace Server.Spells.Fifth
|
|||
m_Item = item;
|
||||
m_InLOS = inLOS;
|
||||
m_CanFit = canFit;
|
||||
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
|
|||
|
|
@ -125,7 +125,6 @@ namespace Server.Spells.Fourth
|
|||
}
|
||||
|
||||
Delay = TimeSpan.FromSeconds(time);
|
||||
Priority = TimerPriority.OneSecond;
|
||||
|
||||
m_Owner = target;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,8 +229,6 @@ namespace Server.Spells.Fourth
|
|||
m_Item = item;
|
||||
m_InLOS = inLOS;
|
||||
m_CanFit = canFit;
|
||||
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -120,7 +120,6 @@ namespace Server.Spells.Necromancy
|
|||
{
|
||||
m_Target = target;
|
||||
m_End = Core.Now + delay;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -552,8 +552,6 @@ namespace Server.Spells.Ninjitsu
|
|||
m_Body = body;
|
||||
m_Hue = hue;
|
||||
m_Counter = 0;
|
||||
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
|
|||
|
|
@ -172,7 +172,6 @@ namespace Server.Spells.Second
|
|||
|
||||
m_Caster = caster;
|
||||
Delay = TimeSpan.FromSeconds(val);
|
||||
Priority = TimerPriority.OneSecond;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
|
|||
|
|
@ -191,7 +191,6 @@ namespace Server.Spells.Seventh
|
|||
|
||||
public InternalTimer(InternalItem item, TimeSpan duration) : base(duration)
|
||||
{
|
||||
Priority = TimerPriority.OneSecond;
|
||||
m_Item = item;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -180,7 +180,6 @@ namespace Server.Spells.Seventh
|
|||
|
||||
public InternalTimer(Item item) : base(TimeSpan.FromSeconds(30.0))
|
||||
{
|
||||
Priority = TimerPriority.OneSecond;
|
||||
m_Item = item;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,8 +72,6 @@ namespace Server.Spells.Sixth
|
|||
m_Target = target;
|
||||
|
||||
m_Spell?.StartDelayedDamageContext(attacker, this);
|
||||
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
|
|||
|
|
@ -226,7 +226,6 @@ namespace Server.Spells.Sixth
|
|||
|
||||
public InternalTimer(Item item, TimeSpan duration) : base(duration)
|
||||
{
|
||||
Priority = TimerPriority.OneSecond;
|
||||
m_Item = item;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -198,7 +198,6 @@ namespace Server.Spells.Third
|
|||
|
||||
public InternalTimer(InternalItem item, TimeSpan duration) : base(duration)
|
||||
{
|
||||
Priority = TimerPriority.OneSecond;
|
||||
m_Item = item;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ namespace Server.Spells
|
|||
{
|
||||
m_Caster = caster;
|
||||
m_Creature = creature;
|
||||
Priority = TimerPriority.OneSecond;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue