Got timer to work

Finally the timer started working, can start and stop the function from
running every x amount of milliseconds.