]> git.cworth.org Git - fips/blobdiff - metrics.c
Tiny refactoring of metrics_end_frame interface
[fips] / metrics.c
index 79aeb6dacaec55c331fd92af3007daae1d4ebfe2..d751ce20f6fd146dd050085abe3234e0e296a6fa 100644 (file)
--- a/metrics.c
+++ b/metrics.c
@@ -782,6 +782,9 @@ metrics_end_frame (metrics_t *metrics)
        static int initialized = 0;
        static struct timeval tv_start, tv_now;
 
+       /* Don't leave any counters running over work we do here. */
+       metrics_counter_stop (metrics);
+
        if (! initialized) {
                gettimeofday (&tv_start, NULL);
                if (getenv ("FIPS_VERBOSE"))
@@ -805,4 +808,7 @@ metrics_end_frame (metrics_t *metrics)
 
                print_program_metrics (metrics);
        }
+
+       /* Start the counter up again now that we're done. */
+       metrics_counter_start (metrics);
 }