There is a monotonic time source available in JavaScript, though:
https://developer.mozilla.org/en-US/docs/Web/API/Performance...As I understand it, the precision of such timers has been limited a bit in browsers to mitigate some Spectre attacks (and maybe others), but I imagine it would still be fine for this purpose.