Drift-minimizing setInterval replacement and high-precision timer utility for Node and browser