]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make the evaluation of a timer a constant operation. For this, we have to make the...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 18 Jun 1999 11:49:29 +0000 (11:49 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 18 Jun 1999 11:49:29 +0000 (11:49 +0000)
git-svn-id: https://svn.dealii.org/trunk@1415 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 4bc94ec2fb0cc51305fa0af41add511a137d3d97..be586fe4ad9666f256c9fda75c8729b6b3839e9d 100644 (file)
@@ -55,7 +55,7 @@ public:
   // (which is now nearly every 30 minutes on UNIX machines) in long-time
   // measurements.
   //
-    double operator() ();
+    double operator() () const;
 
   private:
 
@@ -81,7 +81,7 @@ public:
                                      * number of seconds after which an
                                      * overflow occurs.
                                      */
-    unsigned int        overflow;
+    mutable unsigned int overflow;
 
                                     /**
                                      * Store whether the timer is presently
index cc0731a987954cee8fee2bc8403f640a64c4eeee..f52fd652205aa1a82aae1670441b4997599d7902 100644 (file)
@@ -45,7 +45,7 @@ double Timer::stop () {
 
 
 
-double Timer::operator() () {
+double Timer::operator() () const {
   if (running)
     {
       const double dtime =  static_cast<double>(clock()) / CLOCKS_PER_SEC - start_time;

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.