File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ void RepositoryBenchmark::InitTask()
130130
131131 // start a timer in a thread to send monitoring metrics, if needed
132132 if (mThreadedMonitoring ) {
133- mTimer = new boost::asio::deadline_timer (io, boost::posix_time:: seconds (mThreadedMonitoringInterval ));
133+ mTimer = new boost::asio::system_timer (io, seconds (mThreadedMonitoringInterval ));
134134 mTimer ->async_wait (boost::bind (&RepositoryBenchmark::checkTimedOut, this ));
135135 th = new thread ([&] { io.run (); });
136136 }
@@ -141,7 +141,7 @@ void RepositoryBenchmark::checkTimedOut()
141141 mMonitoring ->send ({ mTotalNumberObjects , " ccdb_benchmark_objects_sent" }, DerivedMetricMode::RATE);
142142
143143 // restart timer
144- mTimer ->expires_at ( mTimer -> expires_at () + boost::posix_time:: seconds (mThreadedMonitoringInterval ));
144+ mTimer ->expires_after ( seconds (mThreadedMonitoringInterval ));
145145 mTimer ->async_wait (boost::bind (&RepositoryBenchmark::checkTimedOut, this ));
146146}
147147
Original file line number Diff line number Diff line change 2222#include < TH1.h>
2323#include < Monitoring/MonitoringFactory.h>
2424#include < boost/asio.hpp>
25- #include < boost/asio/deadline_timer .hpp>
25+ #include < boost/asio/system_timer .hpp>
2626#include < thread>
2727#include < string>
2828
@@ -64,7 +64,7 @@ class RepositoryBenchmark : public fair::mq::Device
6464 // TH1* mMyHisto;
6565
6666 // variables for the timer
67- boost::asio::deadline_timer * mTimer ; // / the asynchronous timer to send monitoring data
67+ boost::asio::system_timer * mTimer ; // / the asynchronous timer to send monitoring data
6868 boost::asio::io_context io;
6969 std::thread* th;
7070};
You can’t perform that action at this time.
0 commit comments