MTobjects clocks
Event management for Uno, Nano, Mega
MTclock
An object MTclock regularly calls for its function onTime() then the one pointed out by onTimeFunction.
Timer
A timer will trigger a unique action after a certain time after triggered it. It's a staircase timer, a delay for bomb ...
By default, a timer is therefore not active, it must then be triggered to activate it. You can use an MTclock object to make it:
#include <MTobjects.h> // Creation of a 1s duration timer MTclock Timer(1000 milli_seconds, myFunction, 1 action_and_stop, MT_OFF); // Start of the timer Timer.start(); // Call "myFunction" in 1s
MTDoubleClock
An object MTdoubleclock alternately calls for the functions onTime1() then onTimefunction1 or onTime2() then ontimefunction2.