diff --git a/LCS/Common/include/Common/Timer.h b/LCS/Common/include/Common/Timer.h index 33451ef80e59051e9aa2c3fa7d7845f6255508b7..bc95661c4ad4b5b4f7b618bf431fab5feddc0924 100644 --- a/LCS/Common/include/Common/Timer.h +++ b/LCS/Common/include/Common/Timer.h @@ -144,7 +144,7 @@ namespace LOFAR { std::stringstream logStr; LOG_DEBUG_STR(print(logStr).rdbuf()); } else - print(std::clog); + std::clog << *this << std::endl; } } diff --git a/LCS/Common/src/Timer.cc b/LCS/Common/src/Timer.cc index 74d892a9dec846d2d180cb32216e63bb4d84d32d..231dfcb962cdb706cb12cba8cc0c0ff5e3970174 100644 --- a/LCS/Common/src/Timer.cc +++ b/LCS/Common/src/Timer.cc @@ -98,8 +98,6 @@ ostream &NSTimer::print(ostream &str) const } if (count == 0) { str << "not used"; - if (!log_on_destruction) - str << endl; } else { double total = static_cast<double>(total_time); if (CPU_speed_in_MHz == 0) { @@ -111,8 +109,6 @@ ostream &NSTimer::print(ostream &str) const << ", total = " << PrettyTime(total); } str << ", count = " << setw(9) << count; - if (!log_on_destruction) - str << endl; } return str; } diff --git a/LCS/Common/test/tTimer.cc b/LCS/Common/test/tTimer.cc index b810028ce1e0f211a30ebafcd492f60c3837bf22..8c26b6721323d35578f09c8b054a13c4292992a6 100644 --- a/LCS/Common/test/tTimer.cc +++ b/LCS/Common/test/tTimer.cc @@ -49,7 +49,7 @@ int main() timer.stop(); } - std::cout << timer; + std::cout << timer << std::endl; return 0; }