diff options
Diffstat (limited to 'Carpet/Carpet/src/Timers.cc')
-rw-r--r-- | Carpet/Carpet/src/Timers.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Carpet/Carpet/src/Timers.cc b/Carpet/Carpet/src/Timers.cc index 4460c0eaa..585677388 100644 --- a/Carpet/Carpet/src/Timers.cc +++ b/Carpet/Carpet/src/Timers.cc @@ -50,7 +50,12 @@ namespace Carpet { /// Stop the timer - it must be the most recently started timer void Timer::stop () { - TimerNode::getCurrentTimer()->stop(); + TimerNode *current = TimerNode::getCurrentTimer(); + if(current->getName() != name()) + CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING, + "Trying to stop enclosing timer '%s' before enclosed time '%s'", + name().c_str(), current->getName().c_str()); + current->stop(); } /// Return the name of the timer |