diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 8f691bf196..abb942b031 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -3541,6 +3541,9 @@ cmDuration cmCTest::GetElapsedTime() const cmDuration cmCTest::GetRemainingTimeAllowed() const { + if (this->Impl->TimeLimit == cmCTest::MaxDuration()) { + return cmCTest::MaxDuration(); + } return this->Impl->TimeLimit - this->GetElapsedTime(); }