Skip to content
Snippets Groups Projects
Commit 09e4d63b authored by Jan David Mol's avatar Jan David Mol
Browse files

bug 1303: do not add a newline by default when sending a timer to a stream

parent c1915b0f
No related branches found
No related tags found
No related merge requests found
...@@ -144,7 +144,7 @@ namespace LOFAR { ...@@ -144,7 +144,7 @@ namespace LOFAR {
std::stringstream logStr; std::stringstream logStr;
LOG_DEBUG_STR(print(logStr).rdbuf()); LOG_DEBUG_STR(print(logStr).rdbuf());
} else } else
print(std::clog); std::clog << *this << std::endl;
} }
} }
......
...@@ -98,8 +98,6 @@ ostream &NSTimer::print(ostream &str) const ...@@ -98,8 +98,6 @@ ostream &NSTimer::print(ostream &str) const
} }
if (count == 0) { if (count == 0) {
str << "not used"; str << "not used";
if (!log_on_destruction)
str << endl;
} else { } else {
double total = static_cast<double>(total_time); double total = static_cast<double>(total_time);
if (CPU_speed_in_MHz == 0) { if (CPU_speed_in_MHz == 0) {
...@@ -111,8 +109,6 @@ ostream &NSTimer::print(ostream &str) const ...@@ -111,8 +109,6 @@ ostream &NSTimer::print(ostream &str) const
<< ", total = " << PrettyTime(total); << ", total = " << PrettyTime(total);
} }
str << ", count = " << setw(9) << count; str << ", count = " << setw(9) << count;
if (!log_on_destruction)
str << endl;
} }
return str; return str;
} }
......
...@@ -49,7 +49,7 @@ int main() ...@@ -49,7 +49,7 @@ int main()
timer.stop(); timer.stop();
} }
std::cout << timer; std::cout << timer << std::endl;
return 0; return 0;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment