From bb19cd31377558730c1201712a63eac6d9be9a3e Mon Sep 17 00:00:00 2001 From: Luke De Feo Date: Mon, 5 Aug 2024 03:49:43 -0700 Subject: [PATCH] Fix frame discarding logic Summary: For some reason this wasnt working with adding the small number. This approach works best Differential Revision: D60389837 fbshipit-source-id: 2a703970abde85211fa13da592a0bc6e0758677a --- desktop/plugins/public/ui-debugger/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/plugins/public/ui-debugger/index.tsx b/desktop/plugins/public/ui-debugger/index.tsx index a1a69323a31..4c8671a0525 100644 --- a/desktop/plugins/public/ui-debugger/index.tsx +++ b/desktop/plugins/public/ui-debugger/index.tsx @@ -183,12 +183,12 @@ export function plugin(client: PluginClient) { }; streamInterceptor.on('frameUpdated', (frame) => { - if (frame.frameTime > lastProcessedFrameTime.get()) { + if (frame.frameTime >= lastProcessedFrameTime.get()) { applyFrameData(frame.nodes, frame.snapshot); lastProcessedFrameTime.set(frame.frameTime); } else { console.debug( - '[ui-debugger] frameTime is older than lastProcessedFrameTime... discarding', + `[ui-debugger] frameTime ${frame.frameTime} is older than lastProcessedFrameTime ${lastProcessedFrameTime.get()}... discarding`, ); } });