]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/layout.cpp
Do not tick the clock while halted
[r2c2.git] / source / libr2c2 / layout.cpp
index a6abc500448782341378376a83bf35c6500325ff..43ce921475cf9971b3ff518f48cf6d5425aedf14 100644 (file)
@@ -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<Sensor *>::iterator i=sensors.get().begin(); i!=sensors.get().end(); ++i)
                (*i)->tick(dt);