mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 23:00:03 +00:00
fix(studio): prevent negative timeline latency telemetry (#2905)
This commit is contained in:
@@ -87,7 +87,7 @@ export function useTimelinePerformanceTelemetry(context: TimelinePerformanceCont
|
||||
state.pendingScrollStartedAt = now;
|
||||
state.frameRequest = requestAnimationFrame((frameAt) => {
|
||||
state.frameRequest = 0;
|
||||
state.frameLatencies.push(frameAt - state.pendingScrollStartedAt);
|
||||
state.frameLatencies.push(performance.now() - state.pendingScrollStartedAt);
|
||||
if (state.previousFrameAt !== null) {
|
||||
state.frameIntervals.push(frameAt - state.previousFrameAt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user