aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-03-20 15:56:44 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-03-20 15:56:44 +0000
commit6c04aa3fe1a0026aac3a17fb45e0f2de63142548 (patch)
tree81b26721b96580cbaebf56a7e112521ebd253153 /lib
parent5518d56f51a8951cc7cea96ee1782ba470380ddc (diff)
downloadenigma2-6c04aa3fe1a0026aac3a17fb45e0f2de63142548.tar.gz
enigma2-6c04aa3fe1a0026aac3a17fb45e0f2de63142548.zip
small fix
Diffstat (limited to 'lib')
-rw-r--r--lib/base/ebase.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/base/ebase.cpp b/lib/base/ebase.cpp
index e53aa745..93bfd342 100644
--- a/lib/base/ebase.cpp
+++ b/lib/base/ebase.cpp
@@ -289,11 +289,13 @@ int eMainloop::iterate(unsigned int twisted_timeout, PyObject **res, ePyObject d
{
timeval now, timeout;
gettimeofday(&now, 0);
- m_twisted_timer -= time_offset;
+ m_twisted_timer += time_offset; // apply pending offset
if (m_twisted_timer<=now) // timeout
return 0;
timeout = m_twisted_timer - now;
to = timeout.tv_sec * 1000 + timeout.tv_usec / 1000;
+ // remove pending offset .. it is re-applied in next call of processOneEvent.. applyTimeOffset
+ m_twisted_timer -= time_offset;
}
ret = processOneEvent(to, res, dict);
} while ( !ret && !(res && *res) );