src: work around low precision timers in browsers like safari.