diff options
author | Guy Harris <guy@alum.mit.edu> | 2008-08-28 19:50:46 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2008-08-28 19:50:46 +0000 |
commit | 7780d2b8a3f1a4b3caa7820471c1f689e2af5db9 (patch) | |
tree | 2b1a6c27ae5ae55dcfb01c14b6ad673f19bc6723 | |
parent | 56ae1ea2f7567cc99ada8fe0be6b3dd1532f1563 (diff) |
In time_stat_init(), initialize all the structure members.
Initialize the nstime_t members by calling nstime_set_zero().
svn path=/trunk/; revision=26102
-rw-r--r-- | timestats.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/timestats.c b/timestats.c index ac50f50fc1..ccbfa16fd0 100644 --- a/timestats.c +++ b/timestats.c @@ -30,12 +30,12 @@ void time_stat_init(timestat_t *stats) { stats->num = 0; - stats->min.secs = 0; - stats->min.nsecs = 0; - stats->max.secs = 0; - stats->max.nsecs = 0; - stats->tot.secs = 0; - stats->tot.nsecs = 0; + stats->min_num = 0; + stats->max_num = 0; + nstime_set_zero(&stats->min); + nstime_set_zero(&stats->max); + nstime_set_zero(&stats->tot); + stats->variance = 0.0; } /* Update a timestat_t struct with a new sample */ |