Procházet zdrojové kódy

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 姚伟忠 před 12 roky
rodič
revize
dbb8d077da
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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);
     elapsed = frameTimer_.GetUSec(true);
     #ifdef ENABLE_TESTING
     #ifdef ENABLE_TESTING
-    if (timeOut_ != 0)
+    if (timeOut_ > 0)
     {
     {
         timeOut_ -= elapsed;
         timeOut_ -= elapsed;
-        if (timeOut_ < 0)
+        if (timeOut_ <= 0)
             Exit();
             Exit();
     }
     }
     #endif
     #endif