]> source.dussan.org Git - tigervnc.git/commitdiff
Improved debugging version of the poll() method.
authorConstantin Kaplinsky <const@tightvnc.com>
Fri, 10 Feb 2006 06:43:56 +0000 (06:43 +0000)
committerConstantin Kaplinsky <const@tightvnc.com>
Fri, 10 Feb 2006 06:43:56 +0000 (06:43 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@479 3789f03b-4d11-0410-bbf8-ca57d06f2519

x0vncserver/PollingManager.cxx

index 3e5aa3e74190ed4be711430f03d9d32c20349ffe..99f97874e1e4f0d5451d8f75f1f920ec94a31a50 100644 (file)
@@ -152,6 +152,7 @@ void PollingManager::pollDebug()
   timeSaved.tv_sec = 0;
   timeSaved.tv_usec = 0;
   gettimeofday(&timeSaved, &tz);
+  int step = m_pollingStep;
 
   poll();
 
@@ -159,7 +160,7 @@ void PollingManager::pollDebug()
   int diff = (int)((timeNow.tv_usec - timeSaved.tv_usec + 500) / 1000 +
                    (timeNow.tv_sec - timeSaved.tv_sec) * 1000);
   if (diff != 0)
-    fprintf(stderr, "DEBUG: poll(): %4d ms\n", diff);
+    fprintf(stderr, "DEBUG: poll(): %4d ms [step %2d]\n", diff, step % 32);
 }
 
 //