COIN-OR::LEMON - Graph Library

Changeset 1806:1530c115580f in lemon-0.x for lemon


Ignore:
Timestamp:
11/16/05 14:21:57 (18 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2349
Message:

The first parameter of runningTimeTest became const.
It is necessary to enable to pass of temporary objects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/time_measure.h

    r1780 r1806  
    220220  ///
    221221  ///The \ref Timer can also be \ref stop() "stopped" and
    222   ///\ref start() "started" again, so it is easy to compute collected
     222  ///\ref start() "started" again, so it is possible to compute collected
    223223  ///running times.
    224224  ///
     
    372372 
    373373  template<class F>
    374   TimeStamp runningTimeTest(F &f,double min_time=10,int *num = NULL,
     374  TimeStamp runningTimeTest(const F &f,double min_time=10,int *num = NULL,
    375375                        TimeStamp *full_time=NULL)
    376376  {
     
    379379    int total=0;
    380380    for(int tn=1;tn < 1<<24; tn*=2) {
    381       for(;total<tn;total++) f();
     381      for(;total<tn;total++) const_cast<F &>(f)();
    382382      full=t;
    383383      if(full.realTime()>min_time) {
Note: See TracChangeset for help on using the changeset viewer.