From: heister Date: Wed, 20 Mar 2013 15:13:57 +0000 (+0000) Subject: add TimerOutput::reset() X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8b035974558e96e8e999358408e6faebc8eeb9e;p=dealii-svn.git add TimerOutput::reset() git-svn-id: https://svn.dealii.org/trunk@28955 0785d39b-7218-0410-832d-ea1e28bc413d --- 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