diff options
author | Brad King <brad.king@kitware.com> | 2005-03-30 21:11:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-03-30 21:11:37 (GMT) |
commit | a0e71e77f917b2ddef312a1b9043af1b31558b3c (patch) | |
tree | 83a72d2f1fff5e309cb76422f38f4f1ea70f8f9b /Source/cmCTest.cxx | |
parent | 3bb990dcf1d488a3e9b4489e547ea705202b9c6a (diff) | |
download | CMake-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.cxx | 4 |
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 ) |