aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOASCII
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2011-06-02 11:13:18 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2011-06-02 11:13:18 +0200
commitd619160df91b262a4f30a00fbdaec06c62c8fc3c (patch)
tree5e5e1626d9cc0a50a9071b805e0e448ad7c48629 /Carpet/CarpetIOASCII
parentf3369326f2801105c97dec5d1c66265633647b30 (diff)
Adapt Carpet to hierarchical timers
Specifically, remove any hierarchy information that has been added to the name of timers, as well as any code for creating timers dynamically, as these are now unnecessary. Additionally, time some previously-untimed parts of the code and make timer names in some places more consistent.
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;
}