summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2017-11-07 15:37:31 -0800
committerAndrew Reynolds <andrew.j.reynolds@gmail.com>2017-11-07 17:37:31 -0600
commit5a98219512880392bc045f21a3c857438cd76506 (patch)
tree2bc66cd62030259f57cee9648ebdd15ac92e0d45 /src
parent6b8c686fb2407620e4fdf48bb98030f782925b99 (diff)
Initialize TimerStat::d_start. (#1330)
* Initialize TimerStat::d_start. * 0 initializing d_data.
Diffstat (limited to 'src')
-rw-r--r--src/util/statistics_registry.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/util/statistics_registry.h b/src/util/statistics_registry.h
index 6e74357c6..3de001e32 100644
--- a/src/util/statistics_registry.h
+++ b/src/util/statistics_registry.h
@@ -720,13 +720,8 @@ public:
* Construct a timer statistic with the given name. Newly-constructed
* timers have a 0.0 value and are not running.
*/
- TimerStat(const std::string& name) :
- BackedStat< timespec >(name, timespec()),
- d_running(false) {
- /* timespec is POD and so may not be initialized to zero;
- * here, ensure it is */
- d_data.tv_sec = d_data.tv_nsec = 0;
- }
+ TimerStat(const std::string& name)
+ : BackedStat<timespec>(name, {0, 0}), d_start{0, 0}, d_running(false) {}
/** Start the timer. */
void start();
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback