From 777b81869086c8c01b18fd06f252c16274aebd91 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 14 Jul 2016 00:52:43 +0900 Subject: Add offset value to Timer::clock::now() to treat 0 as special value --- src/TimerA2.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/TimerA2.h') diff --git a/src/TimerA2.h b/src/TimerA2.h index 2370dba3..baf5ef22 100644 --- a/src/TimerA2.h +++ b/src/TimerA2.h @@ -54,9 +54,13 @@ public: Timer(const Timer& time) = default; Timer(Timer&& time) = default; - template constexpr Timer(const duration& t) : tp_(t) {} + template + constexpr explicit Timer(const duration& t) + : tp_(t) + { + } - Timer(const Clock::time_point& tp); + explicit Timer(const Clock::time_point& tp); Timer& operator=(Timer&& timer) = default; Timer& operator=(const Timer& timer) = default; -- cgit