+void eMainloop::addTimeOffset(int offset)
+{
+ for (ePtrList<eMainloop>::iterator it(existing_loops.begin()); it != existing_loops.end(); ++it )
+ it->addInstanceTimeOffset(offset);
+}
+
+void eMainloop::addInstanceTimeOffset(int offset)
+{
+ singleLock s(recalcLock);
+ if (m_timer_list.empty())
+ time_offset=0;
+ else
+ {
+ if ( time_offset )
+ eDebug("time_offset %d avail.. add new offset %d than new is %d",
+ time_offset, offset, time_offset+offset);
+ time_offset+=offset;
+ }
+}
+
+void eMainloop::applyTimeOffset()
+{
+ singleLock s(recalcLock);
+ if ( time_offset )
+ {
+ for (ePtrList<eTimer>::iterator it(m_timer_list.begin()); it != m_timer_list.end(); ++it )
+ it->addTimeOffset( time_offset );
+ m_twisted_timer += time_offset;
+ time_offset=0;
+ }
+}
+