XbmcThreads::EndTime: MillisLeft should always be zero is 'totalWaitTime' is zero
authorKarlson2k <k2k@narod.ru>
Sat, 24 Aug 2013 20:07:07 +0000 (00:07 +0400)
committerKarlson2k <k2k@narod.ru>
Tue, 15 Oct 2013 11:36:05 +0000 (15:36 +0400)
xbmc/threads/SystemClock.h

index 655cb8e..3b6fe40 100644 (file)
@@ -57,6 +57,8 @@ namespace XbmcThreads
     {
       if (totalWaitTime == InfiniteValue)
         return InfiniteValue;
+      if (totalWaitTime == 0)
+        return 0;
       unsigned int timeWaitedAlready = (SystemClockMillis() - startTime);
       return (timeWaitedAlready >= totalWaitTime) ? 0 : (totalWaitTime - timeWaitedAlready);
     }