]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add TimerOutput::reset()
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 20 Mar 2013 15:13:57 +0000 (15:13 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 20 Mar 2013 15:13:57 +0000 (15:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@28955 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/timer.h
deal.II/source/base/timer.cc

index fa2bf8a1459484c47d65be531687f02f1ffda9dd..5d1cdfc1b354c10b823e08af65171bd6e90a752a 100644 (file)
@@ -452,6 +452,11 @@ public:
    */
   void enable_output ();
 
+  /**
+   * Resets the recorded timing information.
+   */
+  void reset ();
+
 private:
   /**
    * A timer object for the overall
index 2cdda325706643f0481e05575133df3ea3e10d92..c6d905beae00ccc66c6f151713c4e6f124994675 100644 (file)
@@ -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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.