From f8b035974558e96e8e999358408e6faebc8eeb9e Mon Sep 17 00:00:00 2001 From: heister Date: Wed, 20 Mar 2013 15:13:57 +0000 Subject: [PATCH] add TimerOutput::reset() git-svn-id: https://svn.dealii.org/trunk@28955 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/base/timer.h | 5 +++++ deal.II/source/base/timer.cc | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/deal.II/include/deal.II/base/timer.h b/deal.II/include/deal.II/base/timer.h index fa2bf8a145..5d1cdfc1b3 100644 --- a/deal.II/include/deal.II/base/timer.h +++ b/deal.II/include/deal.II/base/timer.h @@ -452,6 +452,11 @@ public: */ void enable_output (); + /** + * Resets the recorded timing information. + */ + void reset (); + private: /** * A timer object for the overall diff --git a/deal.II/source/base/timer.cc b/deal.II/source/base/timer.cc index 2cdda32570..c6d905beae 100644 --- a/deal.II/source/base/timer.cc +++ b/deal.II/source/base/timer.cc @@ -609,5 +609,13 @@ TimerOutput::enable_output () output_is_enabled = true; } +void +TimerOutput::reset () +{ + Threads::Mutex::ScopedLock lock (mutex); + sections.clear(); + active_sections.clear(); +} + DEAL_II_NAMESPACE_CLOSE -- 2.39.5