You've already forked mariadb-columnstore-engine
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:
@ -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
|
||||
|
Reference in New Issue
Block a user