#region Arthea License /*********************************************************************** * Arthea MUD by R. Jennings (2007) http://arthea.googlecode.com/ * * By using this code you comply with the Artistic and GPLv2 Licenses. * ***********************************************************************/ #endregion // Taken from Suroden (http://sourceforge.net/projects/suroden) // and modified for Arthea. // - RJ, Aug'07 using System; namespace Arthea.Updates { /// <summary> /// Summary description for TimerAction. /// </summary> public class TimerAction : IComparable { #region [rgn] Fields (2) /// <summary> /// the interval /// </summary> public double interval = -1; /// <summary> /// The time /// </summary> public double time; #endregion [rgn] #region [rgn] Methods (1) // [rgn] Public Methods (1) /// <summary> /// Executes this instance. /// </summary> public virtual void Execute() { } #endregion [rgn] #region IComparable Members /// <summary> /// Compares the current instance with another object of the same type. /// </summary> /// <param name="obj">An object to compare with this instance.</param> /// <returns> /// A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance is less than obj. Zero This instance is equal to obj. Greater than zero This instance is greater than obj. /// </returns> /// <exception cref="T:System.ArgumentException">obj is not the same type as this instance. </exception> public int CompareTo(object obj) { if (obj is TimerAction) { TimerAction a = obj as TimerAction; return time.CompareTo(a.time); } throw new ArgumentException("Only TimerAction is supported", "obj"); } #endregion } }