Increase timeout for X starting.

Increase logging of what we checked, and how long it took.

BUG=103882
TEST=Run locally.
Review URL: https://chromiumcodereview.appspot.com/9802038

Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 69035d06657f16f2c43d85c687f6634284731ae8
diff --git a/xdisplaycheck.cc b/xdisplaycheck.cc
index 62fe19c..ba4f26f 100644
--- a/xdisplaycheck.cc
+++ b/xdisplaycheck.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
@@ -34,13 +34,14 @@
 }
 
 int main(int argc, char* argv[]) {
-  int kNumTries = 50;
+  int kNumTries = 50;  // 49*48/2 * 10 = 12.25s of waiting
   Display* display = NULL;
-  for (int i = 0; i < kNumTries; ++i) {
+  int tries;
+  for (tries = 0; tries < kNumTries; ++tries) {
     display = XOpenDisplay(NULL);
     if (display)
       break;
-    Sleep(100);
+    Sleep(10 * tries);
   }
 
   if (!display) {
@@ -48,6 +49,8 @@
     return -1;
   }
 
+  fprintf(stderr, "Connected after %d retries\n", tries);
+
 #if defined(USE_AURA)
   // Check for XInput2
   int opcode, event, err;
@@ -69,6 +72,9 @@
   XIDeviceInfo* devices = XIQueryDevice(display, XIAllDevices, &count);
   if (devices)
     XIFreeDeviceInfo(devices);
+
+  fprintf(stderr,
+      "XInput2 verified initially sane on %s.\n", XDisplayName(NULL));
 #endif
 
   return 0;