ryancw 2 лет назад
Родитель
Сommit
3e42ec08b4
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      platform/rtthread/platformTimer.c

+ 3 - 2
platform/rtthread/platformTimer.c

@@ -51,9 +51,10 @@ uint32_t platformTimerRemain(platformTimer_t *platformTimer)
     // uint32_t 没有溢出
     if (overTime >= platformTimer->time)
     {
-        // tnow溢出,不存在时间超时可能性
+        // tnow溢出,时间必然已经超时
         if (tnow < platformTimer->time)
-            return (UINT32_MAX - overTime + tnow + 1);
+            // return (UINT32_MAX - overTime + tnow + 1);
+            return 0;
 
         // tnow没有溢出
         return tnow >= overTime ? 0 : (overTime - tnow);