simple timer for microcontrollers / embedded systems