From: Mikko Rasa Date: Tue, 8 Apr 2014 18:48:11 +0000 (+0300) Subject: Do not tick the clock while halted X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=53c9798cdfd56a25b2437d3df1cf7f6a60d1c7a9;p=r2c2.git Do not tick the clock while halted --- diff --git a/source/libr2c2/layout.cpp b/source/libr2c2/layout.cpp index a6abc50..43ce921 100644 --- a/source/libr2c2/layout.cpp +++ b/source/libr2c2/layout.cpp @@ -385,7 +385,8 @@ void Layout::tick() dt = t-last_tick; last_tick = t; - clock.tick(dt); + if(!driver || !driver->is_halted()) + clock.tick(dt); for(set::iterator i=sensors.get().begin(); i!=sensors.get().end(); ++i) (*i)->tick(dt);