]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
The Timer class can now also return the wall time for a calculation.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 7 Jan 2009 08:10:00 +0000 (08:10 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 7 Jan 2009 08:10:00 +0000 (08:10 +0000)
git-svn-id: https://svn.dealii.org/trunk@18111 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/timer.h
deal.II/doc/news/changes.h

index 140e0d13b9dced314a7d677ddc03de5af2da1fa3..f37ba086dd256385231888ca426e1a18b262033d 100644 (file)
@@ -38,7 +38,8 @@ DEAL_II_NAMESPACE_OPEN
  *
  *   timer.stop ();
  *
- *   std::cout << "Elapsed time: " << timer() << " seconds.";
+ *   std::cout << "Elapsed CPU time: " << timer() << " seconds.";
+ *   std::cout << "Elapsed wall time: " << timer.wall_time() << " seconds.";
  *
  *   // reset timer for the next thing it shall do
  *   timer.reset();
@@ -87,11 +88,10 @@ class Timer
     void reset ();
 
                                     /**
-                                     * Access to the current time
+                                     * Access to the current CPU time
                                      * without disturbing time
-                                     * measurement. The elapsed time
-                                     * is returned in units of
-                                     * seconds.
+                                     * measurement. The elapsed time is
+                                     * returned in units of seconds.
                                      */
     double operator() () const;
 
@@ -151,16 +151,14 @@ class Timer
                                      */
     double              cumulative_time;
 
-
                                     /**
-                                     * Accumulated waoo time for all
+                                     * Accumulated wall time for all
                                      * previous start()/stop() cycles. The
                                      * wall time for the present cycle is
                                      * not included.
                                      */
     double              cumulative_wall_time;
 
-
                                     /**
                                      * Store whether the timer is presently
                                      * running.
index 908532e9d4c1269d78f3c65cf73674ac6b4a6da6..342fd8def297d08e4bfe6cf1fc1a35ae71df1c68 100644 (file)
@@ -324,6 +324,15 @@ inconvenience this causes.
 <h3>base</h3>
 
 <ol>
+  <li>
+  <p>
+  New: The Timer class can now also return the wall time using the method 
+  Timer::wall_time(), as opposed to the CPU time returned by 
+  Timer::operator ().
+  <br> 
+  (Martin Kronbichler 2009/01/07)
+  </p>
+
   <li>
   <p>
   New: The new class types_are_equal allows to write some templates more

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.