@@ -178,7 +178,7 @@ class Manager : public DoutPrefixProvider {
178178 if (pending_tokens == 0 ) {
179179 return ;
180180 }
181- timer.expires_from_now (infinite_duration);
181+ timer.expires_after (infinite_duration);
182182 boost::system::error_code ec;
183183 timer.async_wait (yield[ec]);
184184 ceph_assert (ec == boost::system::errc::operation_canceled);
@@ -297,7 +297,7 @@ class Manager : public DoutPrefixProvider {
297297 << " . error: " << ret << dendl;
298298 }
299299 Timer timer (io_context);
300- timer.expires_from_now (std::chrono::seconds (reservations_cleanup_period_s));
300+ timer.expires_after (std::chrono::seconds (reservations_cleanup_period_s));
301301 boost::system::error_code ec;
302302 timer.async_wait (yield[ec]);
303303 }
@@ -380,7 +380,7 @@ class Manager : public DoutPrefixProvider {
380380 // if queue was empty the last time, sleep for idle timeout
381381 if (is_idle) {
382382 Timer timer (io_context);
383- timer.expires_from_now (std::chrono::microseconds (queue_idle_sleep_us));
383+ timer.expires_after (std::chrono::microseconds (queue_idle_sleep_us));
384384 boost::system::error_code ec;
385385 timer.async_wait (yield[ec]);
386386 }
@@ -657,7 +657,7 @@ class Manager : public DoutPrefixProvider {
657657 const auto duration = (has_error ?
658658 std::chrono::milliseconds (queues_update_retry_ms) : std::chrono::milliseconds (queues_update_period_ms)) +
659659 std::chrono::milliseconds (duration_jitter (rnd_gen));
660- timer.expires_from_now (duration);
660+ timer.expires_after (duration);
661661 const auto tp = ceph::coarse_real_time::clock::to_time_t (ceph::coarse_real_time::clock::now () + duration);
662662 ldpp_dout (this , 20 ) << " INFO: next queues processing will happen at: " << std::ctime (&tp) << dendl;
663663 boost::system::error_code ec;
@@ -743,7 +743,7 @@ class Manager : public DoutPrefixProvider {
743743 Timer timer (io_context);
744744 while (processed_queue_count > 0 ) {
745745 ldpp_dout (this , 5 ) << " INFO: manager stopped. " << processed_queue_count << " queues are still being processed" << dendl;
746- timer.expires_from_now (std::chrono::milliseconds (queues_update_retry_ms));
746+ timer.expires_after (std::chrono::milliseconds (queues_update_retry_ms));
747747 boost::system::error_code ec;
748748 timer.async_wait (yield[ec]);
749749 }
0 commit comments