aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOASCII
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetIOASCII')
-rw-r--r--Carpet/CarpetIOASCII/src/ioascii.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc
index cb3419037..31e61e5fd 100644
--- a/Carpet/CarpetIOASCII/src/ioascii.cc
+++ b/Carpet/CarpetIOASCII/src/ioascii.cc
@@ -228,20 +228,17 @@ namespace CarpetIOASCII {
template<int outdim>
int IOASCII<outdim>::OutputGH (const cGH* const cctkGH)
{
- static Carpet::Timer * timer = NULL;
- if (not timer) {
- ostringstream timer_name;
- timer_name << "CarpetIOASCII<" << outdim << ">::OutputGH";
- timer = new Carpet::Timer (timer_name.str().c_str());
- }
-
- timer->start();
+ ostringstream timer_name;
+ timer_name << "OutputGH<" << outdim << ">";
+ Carpet::Timer timer(timer_name.str());
+
+ timer.start();
for (int vi=0; vi<CCTK_NumVars(); ++vi) {
if (TimeToOutput(cctkGH, vi)) {
TriggerOutput(cctkGH, vi);
}
}
- timer->stop();
+ timer.stop();
return 0;
}