X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Ftimer.hh;h=f5c3583ccc0525c90adf616979fddfb82d8819ce;hp=cb50c3bbc0f6d40a1328d584b93655abf945d2fa;hb=e9a16d767785b1a903a4466ff26265a5f7dae9e5;hpb=6f1b787a10d8ab1a3117a4b8c004dd2d90599608 diff --git a/src/moof/timer.hh b/src/moof/timer.hh index cb50c3b..f5c3583 100644 --- a/src/moof/timer.hh +++ b/src/moof/timer.hh @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -33,7 +34,7 @@ namespace moof { * runloop associated with the current running view will make an attempt to * fire any expired timers as close to their scheduled times as possible. */ -class timer +class timer : public boost::noncopyable { public: @@ -148,6 +149,8 @@ public: */ scalar seconds_remaining() const; + scalar next_expiration() const; + /** * Get whether or not the timer is expired. A timer on a repeating * schedule will never be expired since it will always have a scheduled @@ -191,9 +194,9 @@ public: * Get the absolute time when the next timer is scheduled to expire. * \return Absolute time, in seconds. */ - static scalar next_expiration() + static scalar next_event() { - return next_expiration_; + return next_event_; } @@ -216,7 +219,7 @@ public: private: static unsigned new_identifier(); - static scalar find_next_expiration(); + static scalar find_next_event(); function function_; mode mode_; @@ -224,7 +227,7 @@ private: scalar interval_; unsigned id_; - static scalar next_expiration_; + static scalar next_event_; static hash timers_; };