Ejemplo n.º 1
0
 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");
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 public void Deserialize(CompactReader reader)
 {
     _trace = reader.ReadObject() as string;
     _timeStamp = reader.ReadObject() as HPTime;
 }
Ejemplo n.º 5
0
 public MessageTrace(string trace)
 {
     _trace = trace;
     _timeStamp = HPTime.Now;
 }