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

View File

@ -41,7 +41,6 @@ using namespace joblist;
//#include "boost/filesystem/operations.hpp"
//#include "boost/filesystem/path.hpp"
#include "boost/progress.hpp"
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_array.hpp>
#include <boost/thread.hpp>

View File

@ -27,7 +27,6 @@
#include <clocale>
//#include "boost/filesystem/operations.hpp"
//#include "boost/filesystem/path.hpp"
#include "boost/progress.hpp"
using namespace std;
#include "alarmglobal.h"

View File

@ -24,7 +24,6 @@
#include <unistd.h>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/progress.hpp>
#include <boost/tokenizer.hpp>
#include <boost/algorithm/string.hpp>
#if defined(__linux__)

View File

@ -45,7 +45,6 @@ typedef int pthread_t;
using namespace std;
#include <boost/timer.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_array.hpp>
#include <boost/thread.hpp>

View File

@ -29,7 +29,6 @@
#include <unistd.h>
#include "boost/filesystem/operations.hpp"
#include "boost/filesystem/path.hpp"
#include "boost/progress.hpp"
using namespace std;
#include "rwlock.h"

View File

@ -21,7 +21,6 @@
#include <unistd.h>
#include "boost/filesystem/operations.hpp"
#include "boost/filesystem/path.hpp"
#include "boost/progress.hpp"
#include "boost/scoped_ptr.hpp"
using namespace std;