summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-03-30 21:11:37 (GMT)
committerBrad King <brad.king@kitware.com>2005-03-30 21:11:37 (GMT)
commita0e71e77f917b2ddef312a1b9043af1b31558b3c (patch)
tree83a72d2f1fff5e309cb76422f38f4f1ea70f8f9b /Source/cmCTest.cxx
parent3bb990dcf1d488a3e9b4489e547ea705202b9c6a (diff)
downloadCMake-a0e71e77f917b2ddef312a1b9043af1b31558b3c.zip
CMake-a0e71e77f917b2ddef312a1b9043af1b31558b3c.tar.gz
CMake-a0e71e77f917b2ddef312a1b9043af1b31558b3c.tar.bz2
BUG: It is possible for the nightly start time to be over 24 hours in the future which requires two days to be subtracted. Using a while loop to make sure enough days are added or subtracted. It should never be able to iterate more than twice.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index a7fc62c..e8e16a2 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -79,7 +79,7 @@ struct tm* cmCTest::GetNightlyTime(std::string str,
const int dayLength = 24 * 60 * 60;
//std::cout << "Seconds: " << tctime << std::endl;
- if ( ntime > tctime )
+ while ( ntime > tctime )
{
// If nightlySeconds is in the past, this is the current
// open dashboard, then return nightlySeconds. If
@@ -93,7 +93,7 @@ struct tm* cmCTest::GetNightlyTime(std::string str,
std::cout << " Future time, subtract day: " << ntime << std::endl;
}
}
- if ( tctime > (ntime + dayLength) )
+ while ( tctime > (ntime + dayLength) )
{
ntime += dayLength;
if ( verbose )