]> git.tdb.fi Git - libs/core.git/blobdiff - source/time/timer.cpp
Style updates
[libs/core.git] / source / time / timer.cpp
index 9471463216206b701d285562bb41e0af1901fafc..ab5305948cd7d2040416208cb689ba0a716ef5c8 100644 (file)
@@ -22,7 +22,7 @@ Timer::~Timer()
 
 Timer::Slot &Timer::add(const TimeDelta &td)
 {
-       Slot *s=new Slot(td);
+       Slot *s = new Slot(td);
        mutex.lock();
        slots.push_back(s);
        push_heap(slots.begin(), slots.end());
@@ -33,7 +33,7 @@ Timer::Slot &Timer::add(const TimeDelta &td)
 
 Timer::Slot &Timer::add(const TimeStamp &ts)
 {
-       Slot *s=new Slot(ts);
+       Slot *s = new Slot(ts);
        {
                MutexLock l(mutex);
                slots.push_back(s);
@@ -58,7 +58,7 @@ void Timer::cancel(Slot &slot)
 
 void Timer::tick(bool block)
 {
-       Slot *next=0;
+       Slot *next = 0;
        {
                MutexLock l(mutex);
                while(1)
@@ -71,9 +71,9 @@ void Timer::tick(bool block)
                                        return;
                        }
 
-                       next=slots.begin()->slot;
-                       const TimeStamp &stamp=next->get_timeout();
-                       const TimeStamp t=now();
+                       next = slots.begin()->slot;
+                       const TimeStamp &stamp = next->get_timeout();
+                       const TimeStamp t = now();
                        if(stamp<=t)
                                break;
                        else if(block)
@@ -125,7 +125,7 @@ bool Timer::Slot::increment()
 {
        if(!interval)
                return false;
-       timeout+=interval;
+       timeout += interval;
        return true;
 }