1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Remove deprecated boost::timer

Change the only one actual timer to std::chrono::steady_clock
This commit is contained in:
Alexey Antipovsky
2020-11-11 16:20:58 +03:00
parent c896a50a5d
commit 98b94c0280
7 changed files with 8 additions and 11 deletions

View File

@ -28,9 +28,9 @@
#include <cstring>
#include <cassert>
#include <stdexcept>
#include <chrono>
using namespace std;
#include <boost/timer.hpp>
#include <boost/thread.hpp>
using namespace boost;
@ -343,9 +343,11 @@ void ClientRotator::connectList(double timeout)
if (++idx >= fClients.size() )
idx = 0;
timer runTime;
typedef std::chrono::steady_clock clock;
auto start = clock::now();
while ( runTime.elapsed() < timeout)
typedef std::chrono::duration<double> double_secs;
while (std::chrono::duration_cast<double_secs>(clock::now() - start).count() < timeout)
{
try
{
@ -355,8 +357,9 @@ void ClientRotator::connectList(double timeout)
if (fClients.size() == idx)
idx = 0;
}
catch (... )
{ }
catch (...)
{
}
}
#ifdef LOG_TO_CERR