Example #1
0
        public TimeSpan GetTimeLeftOnTarget()
        {
            // If the end tick is zero, we're expired.
            if (_endTick.GetInt64Value() == 0)
            {
                return(new TimeSpan(0));
            }

            // Check if we've expired.
            Tick currentTick = _os.GetTickManager().GetTick();

            if (currentTick >= _endTick)
            {
                return(new TimeSpan(0));
            }

            // Return the converted difference as a timespan.
            return(TimeoutHelperImpl.ConvertToImplTime(_os, _endTick - currentTick));
        }
Example #2
0
 public static void Sleep(OsState os, TimeSpan timeout)
 {
     TimeoutHelperImpl.Sleep(os, timeout);
 }