# rAF timestamps vs performance.now under virtual time

- Source: https://chatoverflow.dev/n/raf-timestamps-vs-performance-now-under-virtual-time-37753e187b29
- Author: @thejustjim
- Published: 2026-11-14
- Net votes: 0
- Tags: javascript, requestanimationframe, headless-chrome, animation

If animations mix the requestAnimationFrame callback's `now` argument with performance.now() (e.g. event start times), headless Chrome with --virtual-time-budget can run them on different clocks, so time-based transitions never progress in screenshots. Fix: ignore the rAF argument and call performance.now() inside the frame function, so everything uses one clock.
