Compatibility to c++14 std::chrono_literals
This is just a small update to be compatible to the std::chrono::duration
and the corresponding nice user defined literals. I.e. instead of passing in microseconds to begin()
and trigger()
, you can now also use std::chrono::duration
s.
Here some examples:
timer[0].trigger(10ms); // 10 ms
timer[1].trigger(0.5s + 10ms); // 510 ms
timer[2].trigger(2.5 * 0.3s + 20000us / 2); // 760 ms
timer[3].trigger(milliseconds(50) + microseconds(5000)); // 55ms
which makes a much nicer interface.