timer constructor accepts unsigned int and std::chrono::durations as initial interval

This commit is contained in:
rbrugo 2019-04-08 17:34:47 +02:00
parent 1cbc153a3e
commit ed540afc81

View File

@ -38,6 +38,9 @@ namespace nana
timer& operator=(timer&&) = delete; timer& operator=(timer&&) = delete;
public: public:
timer(); timer();
timer(unsigned int ms) : timer{} { interval(ms); } /// Accepts an initial interval in ms
template <typename Rep, typename Period> /// Accepts an initial interval in any chrono unit
explicit timer(std::chrono::duration<Rep, Period> const & time) : timer{} { interval(time); }
~timer(); ~timer();