Basic implementation of timer, with break and reseting