diff options
author | Erik Schnetter <schnetter@gmail.com> | 2012-02-25 11:13:57 -0500 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2012-02-25 11:13:57 -0500 |
commit | 677b524b4b458d109b8ceed7450bf98606cbaccb (patch) | |
tree | 3db59f7bd3c356c82763e8a4868d5202e499d331 | |
parent | 4e6ccd46b6ae2b3718e4c39a30277fd302b9f4bd (diff) |
Carpet: Restore output precision after TimerNode output
-rw-r--r-- | Carpet/Carpet/src/TimerNode.cc | 4 |
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 |