Verified Commit 0213179c authored by Justin Carpentier's avatar Justin Carpentier
Browse files

test: fix duplicate namings

Ideally, we should merge the two timers
parent a8785716
Pipeline #13789 passed with stage
in 93 minutes and 5 seconds
......@@ -99,7 +99,7 @@ double distance (const std::vector<Transform3f>& tf,
node.enable_statistics = verbose;
Timer timer;
BenchTimer timer;
timer.start();
for (std::size_t i = 0; i < tf.size(); ++i) {
......@@ -125,7 +125,7 @@ double collide (const std::vector<Transform3f>& tf,
node.enable_statistics = verbose;
Timer timer;
BenchTimer timer;
timer.start();
for (std::size_t i = 0; i < tf.size(); ++i) {
......
......@@ -96,7 +96,7 @@ void collide(const std::vector<Transform3f>& tf,
Results& results)
{
Transform3f Id;
Timer timer;
BenchTimer timer;
for (std::size_t i = 0; i < tf.size(); ++i) {
timer.start();
/* int num_contact = */
......
......@@ -11,7 +11,7 @@ namespace hpp
namespace fcl
{
Timer::Timer()
BenchTimer::BenchTimer()
{
#ifdef _WIN32
QueryPerformanceFrequency(&frequency);
......@@ -28,12 +28,12 @@ Timer::Timer()
}
Timer::~Timer()
BenchTimer::~BenchTimer()
{
}
void Timer::start()
void BenchTimer::start()
{
stopped = 0; // reset stop flag
#ifdef _WIN32
......@@ -44,7 +44,7 @@ void Timer::start()
}
void Timer::stop()
void BenchTimer::stop()
{
stopped = 1; // set timer stopped flag
......@@ -56,7 +56,7 @@ void Timer::stop()
}
double Timer::getElapsedTimeInMicroSec()
double BenchTimer::getElapsedTimeInMicroSec()
{
#ifdef _WIN32
if(!stopped)
......@@ -76,19 +76,19 @@ double Timer::getElapsedTimeInMicroSec()
}
double Timer::getElapsedTimeInMilliSec()
double BenchTimer::getElapsedTimeInMilliSec()
{
return this->getElapsedTimeInMicroSec() * 0.001;
}
double Timer::getElapsedTimeInSec()
double BenchTimer::getElapsedTimeInSec()
{
return this->getElapsedTimeInMicroSec() * 0.000001;
}
double Timer::getElapsedTime()
double BenchTimer::getElapsedTime()
{
return this->getElapsedTimeInMilliSec();
}
......
......@@ -70,11 +70,11 @@ namespace fcl
typedef shared_ptr<octomap::OcTree> OcTreePtr_t;
#endif
class Timer
class BenchTimer
{
public:
Timer();
~Timer();
BenchTimer();
~BenchTimer();
void start(); ///< start timer
void stop(); ///< stop the timer
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment