Commit 7b370b5f authored by Laurent Belcour's avatar Laurent Belcour
Browse files

Adding time information to the MacOS build.

parent 99c6cbd5
......@@ -158,7 +158,7 @@ unsigned int timer::current_time() const
GetSystemTime(&res);
return (unsigned int)(res.wSecond + res.wMinute*60 + res.wHour*360);
#elif __APPLE__
return 0;
return static_cast<unsigned int>(clock() / CLOCKS_PER_SEC);
#else
struct timespec res;
clock_gettime(CLOCK_MONOTONIC, &res);
......
......@@ -52,7 +52,7 @@ bool rational_fitter_quadprog::fit_data(const data* dat, function* fit, const ar
int temp_np = _min_np, temp_nq = _min_nq ;
while(temp_np <= _max_np || temp_nq <= _max_nq)
{
timer time ;
timer time ;
time.start() ;
r->setSize(temp_np, temp_nq);
......@@ -67,6 +67,8 @@ bool rational_fitter_quadprog::fit_data(const data* dat, function* fit, const ar
std::cout << "<<INFO>> fit using np = " << temp_np << " & nq = " << temp_nq << " failed" << std::endl ;
time.stop() ;
std::cout << "<<INFO>> it took " << time << std::endl ;
std::cout.flush() ;
if(temp_np == _max_np && temp_nq == _max_nq)
......
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