Просмотр исходного кода

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 лет назад
Родитель
Сommit
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