been accepted but polling was not activated yet.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2182
3789f03b-4d11-0410-bbf8-
ca57d06f2519
m_initialState = true;
}
+bool PollingScheduler::isRunning()
+{
+ return !m_initialState;
+}
+
void PollingScheduler::newPass()
{
TimeMillis timeNow;
// Reset the object into the initial state (no polling performed).
void reset();
+ // Check if the object is active (not in the initial state).
+ bool isRunning();
+
// Tell the scheduler that new polling pass is just being started.
void newPass();
}
}
- if (clients_connected) {
+ if (!clients_connected)
+ sched.reset();
+
+ if (sched.isRunning()) {
int wait_ms = sched.millisRemaining();
if (wait_ms > 500) {
wait_ms = 500;
// fprintf(stderr, "[%d]\t", wait_ms);
#endif
} else {
- sched.reset();
tv.tv_usec = 100000;
}
tv.tv_sec = 0;