Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
svn path=/trunk/yarp2/; revision=6606
  • Loading branch information
lornat75 committed Mar 17, 2008
1 parent 132ab66 commit e691cbb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions example/ace_check/timers/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ int main()
ACE::init();
fprintf(stderr, "Starting ACE timers test\n");

ACE_Time_Value now1,now2;

ACE_High_Res_Timer timer;
ACE_Profile_Timer profiler;
ACE_Profile_Timer::ACE_Elapsed_Time elTime;
Expand All @@ -48,7 +50,8 @@ int main()

//timer.reset();
//timer.start();
profiler.start();
//profiler.start();
now1 = ACE_OS::gettimeofday ();
ACE_OS::sleep(sleep);
//timer.stop();
profiler.stop();
Expand All @@ -57,13 +60,16 @@ int main()
// timer.elapsed(elapsed);
// timer.elapsedTime();
// time=usecs/1000.0;
profiler.elapsed_time(elTime);
time=elTime.real_time*1000;
// profiler.elapsed_time(elTime);
// time=elTime.real_time*1000;
//elapsed.sec()*1000;
//elapsed.usec()*1000;
now2 = ACE_OS::gettimeofday ();
time=(now2.sec()-now1.sec())*1000;
time+=(now2.usec()-now1.usec())/1000;
avErrors[k]+=fabs(req-time)/iterations;
fprintf(stderr, ".");
fprintf(stderr, "%lf\n", time*1000);
fprintf(stderr, "%lf\n", time);
}
fprintf(stderr, "Completed %d out of %d\n", i+1, iterations);
}
Expand Down

0 comments on commit e691cbb

Please sign in to comment.