aboutsummaryrefslogtreecommitdiff
path: root/src/common/Metric/Metric.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-12-09 21:13:18 +0100
committerShauren <shauren.trinity@gmail.com>2025-02-18 15:39:41 +0100
commit1942647c0d0229aca96602f3617365bd477e94de (patch)
tree7be0db654c17f227d5db3870b455c7bf0a13cb54 /src/common/Metric/Metric.cpp
parent8785c0d5a5bf1967ee1469fdaf0d024dd22f0f0d (diff)
Dep: Replace basic_deadline_timer with std::chrono based basic_waitable_timer
(cherry picked from commit c81183a6600722f3a9bb4996c0849b530fbdd1b0)
Diffstat (limited to 'src/common/Metric/Metric.cpp')
-rw-r--r--src/common/Metric/Metric.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/Metric/Metric.cpp b/src/common/Metric/Metric.cpp
index 06c084a3c2c..08dff35eb98 100644
--- a/src/common/Metric/Metric.cpp
+++ b/src/common/Metric/Metric.cpp
@@ -220,7 +220,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(std::bind(&Metric::SendBatch, this));
}
else
@@ -250,7 +250,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;