diff options
author | Brad King <brad.king@kitware.com> | 2009-02-24 17:50:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-02-24 17:50:48 (GMT) |
commit | d76bc78a1247d0ac5d151a510b8d6ba231daa043 (patch) | |
tree | 6b14d3f30b1049b2440a7b064bfd2b2262f9ebe4 /Source/CTest/cmCTestVC.cxx | |
parent | fdd0d2a32bffc3742b5d40c066a61794135bd6f4 (diff) | |
download | CMake-d76bc78a1247d0ac5d151a510b8d6ba231daa043.zip CMake-d76bc78a1247d0ac5d151a510b8d6ba231daa043.tar.gz CMake-d76bc78a1247d0ac5d151a510b8d6ba231daa043.tar.bz2 |
ENH: Factor out nightly start time computation
Move generation of the nightly start time string from
cmCTestUpdateHandler::ProcessHandler into cmCTestVC.
Diffstat (limited to 'Source/CTest/cmCTestVC.cxx')
-rw-r--r-- | Source/CTest/cmCTestVC.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx index d03b23b..5946674 100644 --- a/Source/CTest/cmCTestVC.cxx +++ b/Source/CTest/cmCTestVC.cxx @@ -72,6 +72,24 @@ std::string cmCTestVC::ComputeCommandLine(char const* const* cmd) } //---------------------------------------------------------------------------- +std::string cmCTestVC::GetNightlyTime() +{ + // Get the nightly start time corresponding to the current dau. + struct tm* t = this->CTest->GetNightlyTime( + this->CTest->GetCTestConfiguration("NightlyStartTime"), + this->CTest->GetTomorrowTag()); + char current_time[1024]; + sprintf(current_time, "%04d-%02d-%02d %02d:%02d:%02d", + t->tm_year + 1900, + t->tm_mon + 1, + t->tm_mday, + t->tm_hour, + t->tm_min, + t->tm_sec); + return current_time; +} + +//---------------------------------------------------------------------------- void cmCTestVC::Cleanup() { this->Log << "--- Begin Cleanup ---\n"; |