Qt: Add back the "ready to go" startup message.
authorGerald Combs <gerald@wireshark.org>
Wed, 24 Jan 2018 01:17:11 +0000 (17:17 -0800)
committerMichael Mann <mmann78@netscape.net>
Wed, 24 Jan 2018 03:15:56 +0000 (03:15 +0000)
The stdin capture test and at least one external application depends
on the "Wireshark is up and ready to go" startup message, so we need to
print it even when DEBUG_STARTUP_TIME isn't defined. Print the startup
time in seconds.

Change-Id: Ic1683b751f9cce30b8ca8a6122eddff44fcda015
Reviewed-on: https://code.wireshark.org/review/25440
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
wireshark-qt.cpp

index d8703a99c7e2f1e647f9d32c2568494d43ac4abe..81ebd9ce6f89465c0f6378ae2fc083616471e412 100644 (file)
@@ -388,9 +388,9 @@ int main(int argc, char *qt_argv[])
 #ifdef HAVE_LIBPCAP
     int                  caps_queries = 0;
 #endif
-#ifdef DEBUG_STARTUP_TIME
     /* Start time in microseconds */
     guint64 start_time = g_get_monotonic_time();
+#ifdef DEBUG_STARTUP_TIME
     /* At least on Windows there is a problem with the logging as the preferences is taken
      * into account and the preferences are loaded pretty late in the startup process.
      */
@@ -863,9 +863,7 @@ int main(int argc, char *qt_argv[])
 #endif /* HAVE_LIBPCAP */
 
     wsApp->allSystemsGo();
-#ifdef DEBUG_STARTUP_TIME
-    g_log(LOG_DOMAIN_MAIN, G_LOG_LEVEL_INFO, "Wireshark is up and ready to go, elapsed time %" G_GUINT64_FORMAT "us \n", g_get_monotonic_time() - start_time);
-#endif
+    g_log(LOG_DOMAIN_MAIN, G_LOG_LEVEL_INFO, "Wireshark is up and ready to go, elapsed time %.3fs\n", (float) (g_get_monotonic_time() - start_time) / 1000000);
     SimpleDialog::displayQueuedMessages(main_w);
 
     /* User could specify filename, or display filter, or both */