How can I accurately measure the time it takes to render a frame?
Currently I am trying to measure it in my animation loop like so:
let startTime = performance.now()
let endTime = performance.now()
let time = endTime-startTime
but this is giving me really small values (e.g. 1 ms) which makes me suspect that the call to renderer.render() is somehow returning instantly.
Is this a good way to measure the rendering time of a frame?