Change utils.timer and add tests

utils.timer.Timer creates a Thread when started and a while loop keeps
running until timer is stopped. In the previous version, a new thread
was created each time the interval was elapsed.
Change utils.timer and add tests

utils.timer.Timer creates a Thread when started and a while loop keeps
running until timer is stopped. In the previous version, a new thread
was created each time the interval was elapsed.