diff options
| author | Shauren <shauren.trinity@gmail.com> | 2024-12-09 21:13:18 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2024-12-09 21:13:18 +0100 |
| commit | c81183a6600722f3a9bb4996c0849b530fbdd1b0 (patch) | |
| tree | 676a1c7ee6b6109ea70ddab9b5b11ab898757df5 /src/common/Metric/Metric.cpp | |
| parent | bf0fe871948d196afcfe0c271c225fa3834e32fc (diff) | |
Dep: Replace basic_deadline_timer with std::chrono based basic_waitable_timer
Diffstat (limited to 'src/common/Metric/Metric.cpp')
| -rw-r--r-- | src/common/Metric/Metric.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/Metric/Metric.cpp b/src/common/Metric/Metric.cpp index e4bc948a8fa..a3956209b08 100644 --- a/src/common/Metric/Metric.cpp +++ b/src/common/Metric/Metric.cpp @@ -225,7 +225,7 @@ void Metric::ScheduleSend() { if (_enabled) { - _batchTimer->expires_from_now(boost::posix_time::seconds(_updateInterval)); + _batchTimer->expires_after(std::chrono::seconds(_updateInterval)); _batchTimer->async_wait([this](boost::system::error_code const&){ SendBatch(); }); } else @@ -255,7 +255,7 @@ void Metric::ScheduleOverallStatusLog() { if (_enabled) { - _overallStatusTimer->expires_from_now(boost::posix_time::seconds(_overallStatusTimerInterval)); + _overallStatusTimer->expires_after(std::chrono::seconds(_overallStatusTimerInterval)); _overallStatusTimer->async_wait([this](const boost::system::error_code&) { _overallStatusTimerTriggered = true; |
