summaryrefslogtreecommitdiff
path: root/src/TimerA2.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-07-14 00:52:43 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-07-14 00:52:43 +0900
commit777b81869086c8c01b18fd06f252c16274aebd91 (patch)
tree663d56b75a199a8564d9e0f7120c65027dfb5d4b /src/TimerA2.h
parent01f870221b2044ed14be828e02b00d4f6452d70d (diff)
Add offset value to Timer::clock::now() to treat 0 as special value
Diffstat (limited to 'src/TimerA2.h')
-rw-r--r--src/TimerA2.h8
1 files changed, 6 insertions, 2 deletions
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 <typename duration> constexpr Timer(const duration& t) : tp_(t) {}
+ template <typename duration>
+ 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;