From aa356b37ac703cc3e4d19547f99fa25715c51291 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 21 Feb 2025 08:01:08 -0400 Subject: [PATCH] MT#62181 wheeltimer: further encapsulate timer We can now move the timer methods specific to the wheeltimer into private scope and designate the wheeltimer class as friend. Change-Id: I2b6bda406ff78733f1909948ed14d18d44b6f3c6 --- core/sip/wheeltimer.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/core/sip/wheeltimer.h b/core/sip/wheeltimer.h index 089695ef..ab9df65e 100644 --- a/core/sip/wheeltimer.h +++ b/core/sip/wheeltimer.h @@ -65,6 +65,13 @@ public: virtual void fire()=0; + // returns absolute expiry time in microseconds + uint64_t get_absolute_expiry() + { + return expires; + } + +private: void arm(uint64_t relative) { if (expires) @@ -89,14 +96,9 @@ public: } } - // microseconds - uint64_t get_absolute_expiry() - { - return expires; - } - -private: uint64_t expires; // absolute, microseconds, set after arming timer + + friend class _wheeltimer; }; #include "singleton.h"