diff --git a/modules/beast_core/thread/DeadlineTimer.h b/modules/beast_core/thread/DeadlineTimer.h index 3fe462ad..e8d8540a 100644 --- a/modules/beast_core/thread/DeadlineTimer.h +++ b/modules/beast_core/thread/DeadlineTimer.h @@ -63,8 +63,17 @@ public: will send a notification. This must be greater than zero. */ + /** @{ */ void setExpiration (double secondsUntilDeadline); + template + void setExpiration (std::chrono::duration const& amount) + { + setExpiration (std::chrono::duration_cast < + std::chrono::duration > (amount).count ()); + } + /** @} */ + /** Set the timer to go off repeatedly with the specified frequency. If the timer is already active, this will reset it. @note If the timer is already active, the old one might go off