aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2012-02-25 11:13:57 -0500
committerBarry Wardell <barry.wardell@gmail.com>2012-09-11 18:23:06 +0100
commit78a64fd4e7b646874ee1a7e5904f31301e920278 (patch)
treeabee8c829e9cac8fae858eaf3a1613b0eb3eeda4
parentb6e2e4dcac3fd2f45d3560ca68fe823d86cb5b50 (diff)
Carpet: Restore output precision after TimerNode output
-rw-r--r--Carpet/Carpet/src/TimerNode.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/Carpet/Carpet/src/TimerNode.cc b/Carpet/Carpet/src/TimerNode.cc
index 326a84d05..f339bce45 100644
--- a/Carpet/Carpet/src/TimerNode.cc
+++ b/Carpet/Carpet/src/TimerNode.cc
@@ -172,6 +172,8 @@ namespace Carpet {
const int pcw = 6;
const int tw = 8;
+ const streamsize oldprecision = out.precision();
+ const ios_base::fmtflags oldflags = out.flags();
// Print this timer value
out << fixed << setw(pcw) << setprecision(1) << 100.0 * t / total << "%"
@@ -205,6 +207,8 @@ namespace Carpet {
<< " | " << space << "untimed" << endl;
}
}
+ out.precision (oldprecision);
+ out.setf (oldflags);
}
/// Print this node and its children as an XML file