aboutsummaryrefslogtreecommitdiff
path: root/Carpet/Carpet/src/Evolve.cc
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2012-10-26 00:56:32 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2012-10-26 01:09:33 +0200
commitb5a8c179373d2fd87d10af08702c3ea91f71e699 (patch)
tree58fb47bc9acfa1861aa4d8bc901e25e8f9b8a0b4 /Carpet/Carpet/src/Evolve.cc
parent710ebc5fbb7921ab933a7daa85748b8a187a56d2 (diff)
Support more than one hierarchy of timers
* Introduce a TimerTree class which contains a pointer to the root and current TimerNodes of that tree * Adapt TimerNode and Timer classes to use TimerTrees rather than static variables * Declare a main_timer_tree variable, which is the default tree to use if you don't specify one in Timer timer("timername")
Diffstat (limited to 'Carpet/Carpet/src/Evolve.cc')
-rw-r--r--Carpet/Carpet/src/Evolve.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/Carpet/Carpet/src/Evolve.cc b/Carpet/Carpet/src/Evolve.cc
index 936414d40..aa51efe23 100644
--- a/Carpet/Carpet/src/Evolve.cc
+++ b/Carpet/Carpet/src/Evolve.cc
@@ -97,8 +97,7 @@ namespace Carpet {
cctkGH->cctk_iteration % output_timer_tree_every == 0 and
cctkGH->cctk_iteration % do_every == 0)
{
- TimerNode *rt = TimerNode::getRootTimer();
- TimerNode *et = rt->getChildTimer("Evolve");
+ TimerNode *et = main_timer_tree.root->getChildTimer("Evolve");
et->print(cout, et->getTime(), 0, timer_tree_threshold_percentage, timer_tree_output_precision);
}
timer.stop();