mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 18:45:52 +00:00
Add chrono APIs to DeadlineTimer
This commit is contained in:
@@ -63,8 +63,17 @@ public:
|
||||
will send a notification. This must be
|
||||
greater than zero.
|
||||
*/
|
||||
/** @{ */
|
||||
void setExpiration (double secondsUntilDeadline);
|
||||
|
||||
template <class Rep, class Period>
|
||||
void setExpiration (std::chrono::duration <Rep, Period> const& amount)
|
||||
{
|
||||
setExpiration (std::chrono::duration_cast <
|
||||
std::chrono::duration <double>> (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
|
||||
|
||||
Reference in New Issue
Block a user