public int CompareTo(object obj) { if (obj is HPTime) { HPTime other = (HPTime)obj; int result = this.Hours.CompareTo(other.Hours); if (result == 0) { result = this.Minutes.CompareTo(other.Minutes); if (result == 0) { result = this.Seconds.CompareTo(other.Seconds); if (result == 0) { result = this.MilliSeconds.CompareTo(other.MilliSeconds); if (result == 0) { return(this.MicroSeconds.CompareTo(other.MicroSeconds)); } return(result); } return(result); } return(result); } return(result); } throw new ArgumentException("Object is not HPTime"); }
public int CompareTo(object obj) { if (obj is HPTime) { HPTime other = (HPTime)obj; int result = this.Hours.CompareTo(other.Hours); if (result == 0) { result = this.Minutes.CompareTo(other.Minutes); if (result == 0) { result = this.Seconds.CompareTo(other.Seconds); if (result == 0) { result = this.MilliSeconds.CompareTo(other.MilliSeconds); if (result == 0) { return(this.MicroSeconds.CompareTo(other.MicroSeconds)); } return(result); } return(result); } return(result); } return(result); } return(1); }
public HPTime DeepClone(PoolManager poolManager) { var clonedHPTime = new HPTime(); clonedHPTime._baseRem = _baseRem; clonedHPTime._baseTime = _baseTime; clonedHPTime._hr = _hr; clonedHPTime._micSec = _micSec; clonedHPTime._min = _min; clonedHPTime._mlSec = _mlSec; clonedHPTime._sec = _sec; return(clonedHPTime); }
public void Deserialize(CompactReader reader) { _trace = reader.ReadObject() as string; _timeStamp = reader.ReadObject() as HPTime; }
public MessageTrace(string trace) { _trace = trace; _timeStamp = HPTime.Now; }