# HG changeset patch # User alpar # Date 1132147317 0 # Node ID 1530c115580fc2c0c8d5d59213f270e4333d1b5c # Parent d284f81f02a52ed95d92a7031575202a9b824248 The first parameter of runningTimeTest became const. It is necessary to enable to pass of temporary objects. diff -r d284f81f02a5 -r 1530c115580f lemon/time_measure.h --- a/lemon/time_measure.h Wed Nov 16 13:19:05 2005 +0000 +++ b/lemon/time_measure.h Wed Nov 16 13:21:57 2005 +0000 @@ -219,7 +219,7 @@ ///\endcode /// ///The \ref Timer can also be \ref stop() "stopped" and - ///\ref start() "started" again, so it is easy to compute collected + ///\ref start() "started" again, so it is possible to compute collected ///running times. /// ///\warning Depending on the operation system and its actual configuration @@ -371,14 +371,14 @@ ///\return The average running time of \c f. template - TimeStamp runningTimeTest(F &f,double min_time=10,int *num = NULL, + TimeStamp runningTimeTest(const F &f,double min_time=10,int *num = NULL, TimeStamp *full_time=NULL) { Timer t; TimeStamp full; int total=0; for(int tn=1;tn < 1<<24; tn*=2) { - for(;total(f)(); full=t; if(full.realTime()>min_time) { if(num) *num=total;