From 53c9798cdfd56a25b2437d3df1cf7f6a60d1c7a9 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 8 Apr 2014 21:48:11 +0300 Subject: [PATCH] Do not tick the clock while halted --- source/libr2c2/layout.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.43.0