X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ftime%2Ftimer.h;h=33257319eba3466d89f28c650efcd26dde0a996d;hp=575599fa6bb92eb16abeeced1f1147bb32cdaa8f;hb=HEAD;hpb=c3e242c2629cbc9645258b30aaf07b7285d4372b diff --git a/source/time/timer.h b/source/time/timer.h index 575599f..7cb5c76 100644 --- a/source/time/timer.h +++ b/source/time/timer.h @@ -3,6 +3,7 @@ #include #include +#include #include #include #include @@ -19,7 +20,7 @@ of the returned slot. This class is thread-safe, to allow running timers in a separate thread. */ -class Timer: private NonCopyable +class MSPCORE_API Timer: private NonCopyable { public: class Slot @@ -43,14 +44,13 @@ private: { Slot *slot; - SlotProxy(Slot *); bool operator<(const SlotProxy &) const; }; std::vector slots; Semaphore sem; Mutex mutex; - bool blocking; + bool blocking = false; public: Timer(); @@ -67,9 +67,6 @@ public: /** Cancels a previously added timer. */ void cancel(Slot &); - /** Deprecated. Use one of the other overloads. */ - void tick(bool block); - /** Waits until a timer expires, then executes it. If no timers have been set, blocks until one is added from another thread. */ void tick();