rewrite timer logic

Now it is single shot, restarts at the end of onTimer()

Signed-off-by: Victor Shcherbinin <victorshch@gmail.com>