Replace setTimeout with setInterval for improving compatibility.

Hi @fschaefer, in my project, it seems Webkit-based browser will suspend the timer if I change the current tab to some other page which the timer is not running. Sorry for that, I can not find a easy way to reproduce this case, but I find some relative issues report about the setTimeout that you can see bellow: https://code.google.com/p/android/issues/detail?id=13540. Hence, I have done this replacement for avoiding compatibility issue. You can check and decide whether to accept this PR. Thank you.