Преглед изворни кода

Ensure engine testing could terminate itself every time.

One of the CI build today stalled when performing the testing. The running application failed to time out. As crazy as its sound that could only mean the high precision counter reaches exactly zero! Murphy Law is proven correct once again.
Yao Wei Tjong 姚伟忠 пре 12 година
родитељ
комит
dbb8d077da
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      Source/Engine/Engine/Engine.cpp

+ 2 - 2
Source/Engine/Engine/Engine.cpp

@@ -587,10 +587,10 @@ void Engine::ApplyFrameLimit()
 
     elapsed = frameTimer_.GetUSec(true);
     #ifdef ENABLE_TESTING
-    if (timeOut_ != 0)
+    if (timeOut_ > 0)
     {
         timeOut_ -= elapsed;
-        if (timeOut_ < 0)
+        if (timeOut_ <= 0)
             Exit();
     }
     #endif