src/test/time_measure_test.cc
changeset 1150 c20bcf71efe3
parent 921 818510fa3d99
child 1164 80bb73097736
equal deleted inserted replaced
2:51f02e95e2ae 3:200a6ce7b654
    23 
    23 
    24 using namespace lemon;
    24 using namespace lemon;
    25 
    25 
    26 int main()
    26 int main()
    27 {
    27 {
    28   int j=0;
       
    29   Timer T;
    28   Timer T;
    30   for(int i=0;i<100;i++) j+=2;
    29   while(T.getRealTime()<1.0) ;
    31   std::cout << T << '\n';
    30   std::cout << T << '\n';
    32   T.reset();
    31   T.reset();
    33   for(int i=0;i<100;i++) j+=2;
    32   while(T.getRealTime()<2.0) ;
    34   std::cout << T << '\n';
    33   std::cout << T << '\n';
    35   
    34   
    36   return 0;
    35   return 0;
    37 }
    36 }