--- ab.c-missing_html_output-4 2008-07-07 16:28:12.000000000 +0200 +++ ab.c-html_sigs-5 2008-07-07 16:32:24.000000000 +0200 @@ -996,9 +996,14 @@ /* calculate and output results in HTML */ -static void output_html_results(void) +static void output_html_results(int sig) { - double timetaken = (double) (lasttime - start) / APR_USEC_PER_SEC; + double timetaken; + + if (sig) { + lasttime = apr_time_now(); /* record final time if interrupted */ + } + timetaken = (double) (lasttime - start) / APR_USEC_PER_SEC; printf("\n\n
Server Software: | " @@ -1151,6 +1156,9 @@ } printf("
---|