commit 3044e4f5d8c18077f4aa6fc6f851cd7dfc6ce302
parent 1e12b821f17cde4b0efd410de7d7a8b0b8fa25c5
Author: Frederic Cambus <fred@statdns.com>
Date: Mon, 8 Feb 2021 17:04:53 +0100
Rename struct timespec 'end' to 'current', to reflect reality.
The summary() function is triggered via SIGINFO, and can be called
multiple times.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/statzone.c b/src/statzone.c
@@ -34,7 +34,7 @@
#include "config.h"
#include "strtolower.h"
-struct timespec begin, end, elapsed;
+struct timespec begin, current, elapsed;
struct results results;
static void
@@ -56,8 +56,8 @@ static void
summary()
{
/* Stopping timer */
- clock_gettime(CLOCK_MONOTONIC, &end);
- timespecsub(&end, &begin, &elapsed);
+ clock_gettime(CLOCK_MONOTONIC, ¤t);
+ timespecsub(¤t, &begin, &elapsed);
/* Print summary */
fprintf(stderr, "Processed %" PRIu64 " lines in %f seconds.\n",