View Full Version : IntervalTimer suggestions

01-07-2014, 11:58 PM
I have recently purchased a Teensy 3.1 and am finding it a wonderful microcontroller board.

I am happy to find that Teensyduino has the IntervalTimer class which is something at the original Arduino API sorely missed.

May I ask if a couple of additional methods could be added to the class?

The first is a timeout(&callback, timeout_us) method, where the call back is called only once after the requested time and a reset() method to start the timout timer again.

I can emulate this functionality by calling the end() method in the callback, but this is far from elegant.

Many thanks :)

01-10-2014, 11:44 AM
The more I think about this, I think it actually requires a separate TimeOut class to compliment the IntervalTimer class for a clean API :)