Improved LEMON_FUNCTION_NAME macro.
It should work fine with GCC and the MS C++ compilers. Otherwise it reverts to
using the __func__ variable which is C99, but I couldn't find a better
alternative.
3 * This file is a part of LEMON, a generic C++ optimization library
5 * Copyright (C) 2003-2008
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
19 #include <lemon/time_measure.h>
21 ///\file \brief Test cases for time_measure.h
23 ///\todo To be extended
26 using namespace lemon;
31 for(int i=0;i<1000;i++)
39 for(int i=0;i<1000;i++)
47 for(n=0;T.realTime()<1.0;n++) ;
48 std::cout << T << " (" << n << " time queries)\n";
50 while(T.realTime()<2.0) ;
51 std::cout << T << '\n';
54 t=runningTimeTest(f,1,&n,&full);
55 std::cout << t << " (" << n << " tests)\n";
56 std::cout << "Total: " << full << "\n";
58 t=runningTimeTest(g,1,&n,&full);
59 std::cout << t << " (" << n << " tests)\n";
60 std::cout << "Total: " << full << "\n";