statzone

DNS zone file analyzer targeted at TLD zones
Log | Files | Refs | README | LICENSE

commit 6151439cc685a88a1442229190cae63dcb8df596
parent 6c982e54c4f30e173216f193e28faa9d3e02f4be
Author: Frederic Cambus <fred@statdns.com>
Date:   Wed, 10 Jun 2020 16:36:49 +0200

Do not use intermediate variable to calculate elapsed time.

Diffstat:
Msrc/statzone.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/statzone.c b/src/statzone.c @@ -78,13 +78,12 @@ displaySummary() { /* Stopping timer */ clock_gettime(CLOCK_MONOTONIC, &end); - timespecsub(&end, &begin, &elapsed); - results.runtime = elapsed.tv_sec + elapsed.tv_nsec / 1E9; /* Print summary */ fprintf(stderr, "Processed %" PRIu64 " lines in %f seconds.\n", - results.processedLines, results.runtime); + results.processedLines, + elapsed.tv_sec + elapsed.tv_nsec / 1E9); } int