diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-01-22 13:27:01 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-01-22 13:27:01 +0000 |
commit | 98c41ba86a949af45103f4ac353dccb4e359f024 (patch) | |
tree | c20239264e772003ab3209322a0287abb813edd8 /src/testbed/gnunet-testbed-profiler.c | |
parent | de91a963fc7210e8bcc6e0856f2e1a0c92bab61d (diff) | |
download | gnunet-98c41ba86a949af45103f4ac353dccb4e359f024.tar.gz gnunet-98c41ba86a949af45103f4ac353dccb4e359f024.zip |
- flush output
Diffstat (limited to 'src/testbed/gnunet-testbed-profiler.c')
-rw-r--r-- | src/testbed/gnunet-testbed-profiler.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/testbed/gnunet-testbed-profiler.c b/src/testbed/gnunet-testbed-profiler.c index 04dd6cbd6..66170c1a7 100644 --- a/src/testbed/gnunet-testbed-profiler.c +++ b/src/testbed/gnunet-testbed-profiler.c | |||
@@ -440,6 +440,11 @@ peer_create_cb (void *cls, struct GNUNET_TESTBED_Peer *peer, const char *emsg) | |||
440 | static void | 440 | static void |
441 | print_overlay_links_summary () | 441 | print_overlay_links_summary () |
442 | { | 442 | { |
443 | static int printed_already; | ||
444 | |||
445 | if (GNUNET_YES == printed_already) | ||
446 | return; | ||
447 | printed_already = GNUNET_YES; | ||
443 | prof_time = GNUNET_TIME_absolute_get_duration (prof_start_time); | 448 | prof_time = GNUNET_TIME_absolute_get_duration (prof_start_time); |
444 | printf ("\n%u links established in %.2f seconds\n", | 449 | printf ("\n%u links established in %.2f seconds\n", |
445 | established_links, ((double) prof_time.rel_value) / 1000.00); | 450 | established_links, ((double) prof_time.rel_value) / 1000.00); |
@@ -575,6 +580,7 @@ controller_event_cb (void *cls, | |||
575 | print_overlay_links_summary (); | 580 | print_overlay_links_summary (); |
576 | result = GNUNET_OK; | 581 | result = GNUNET_OK; |
577 | fprintf (stdout, "Testbed running, waiting for keystroke to shut down\n"); | 582 | fprintf (stdout, "Testbed running, waiting for keystroke to shut down\n"); |
583 | fflush (stdout); | ||
578 | (void) getc (stdin); | 584 | (void) getc (stdin); |
579 | shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); | 585 | shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); |
580 | } | 586 | } |