X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2FMoof%2FTimer.hh;h=bb0b48334c6b24cab36f8a8e4328f5e8b80186ea;hb=cfe38a72ab859538db6269bc9b97f55e8f1f8709;hp=6c1af5615a6426913eac86788a46b9e02116bbd4;hpb=33842c860fe18ca8cf087905992885687434320c;p=chaz%2Fyoink diff --git a/src/Moof/Timer.hh b/src/Moof/Timer.hh index 6c1af56..bb0b483 100644 --- a/src/Moof/Timer.hh +++ b/src/Moof/Timer.hh @@ -45,8 +45,10 @@ namespace Mf { -struct Timer +class Timer { +public: + enum Mode { INVALID = -1, @@ -59,7 +61,7 @@ struct Timer Timer() : - mode_(INVALID) {} + mMode(INVALID) {} Timer(const Function& function, Scalar seconds, Mode mode = NORMAL) { @@ -105,7 +107,7 @@ struct Timer static Scalar getNextFire() { - return nextFire_; + return gNextFire; } static void fireIfExpired(Scalar t); @@ -115,14 +117,14 @@ private: static unsigned getNewID(); static Scalar findNextFire(); - Function function_; - Mode mode_; - Scalar absolute_; - Scalar interval_; - unsigned id_; + Function mFunction; + Mode mMode; + Scalar mAbsolute; + Scalar mInterval; + unsigned mId; - static Scalar nextFire_; - static std::map timers_; + static Scalar gNextFire; + static std::map gTimers; };