- Minor correction in time_measure.h
authoralpar
Tue, 11 Jan 2005 09:04:08 +0000
changeset 10697b81a36809c6
parent 1068 e0b0dcee5e17
child 1070 6aa1520a0f2f
- Minor correction in time_measure.h
- A bit more meaningful test in time_measure_test.cc
src/lemon/time_measure.h
src/test/time_measure_test.cc
     1.1 --- a/src/lemon/time_measure.h	Sun Jan 09 23:44:29 2005 +0000
     1.2 +++ b/src/lemon/time_measure.h	Tue Jan 11 09:04:08 2005 +0000
     1.3 @@ -187,11 +187,12 @@
     1.4      }
     1.5  
     1.6      ///Resets the time counters
     1.7 -    TimeStamp reset()
     1.8 +
     1.9 +    ///Resets the time counters
    1.10 +    ///
    1.11 +    void reset()
    1.12      {
    1.13 -      TimeStamp t(start_time);
    1.14        _reset();
    1.15 -      return start_time-t;
    1.16      }
    1.17  
    1.18  
     2.1 --- a/src/test/time_measure_test.cc	Sun Jan 09 23:44:29 2005 +0000
     2.2 +++ b/src/test/time_measure_test.cc	Tue Jan 11 09:04:08 2005 +0000
     2.3 @@ -25,12 +25,11 @@
     2.4  
     2.5  int main()
     2.6  {
     2.7 -  int j=0;
     2.8    Timer T;
     2.9 -  for(int i=0;i<100;i++) j+=2;
    2.10 +  while(T.getRealTime()<1.0) ;
    2.11    std::cout << T << '\n';
    2.12    T.reset();
    2.13 -  for(int i=0;i<100;i++) j+=2;
    2.14 +  while(T.getRealTime()<2.0) ;
    2.15    std::cout << T << '\n';
    2.16    
    2.17    return 0;