Added onTick event and edited onChange output

global variable for active timer is set at each onChange event and
updated on each tick.