MCPcopy Index your code
hub / github.com/ReactTooltip/react-tooltip / waitUntil

Function waitUntil

benchmarks/fixture/app.tsx:90–101  ·  view source on GitHub ↗
(predicate: () => boolean, timeoutMs: number)

Source from the content-addressed store, hash-verified

88}
89
90async function waitUntil(predicate: () => boolean, timeoutMs: number) {
91 const startedAt = window.performance.now()
92
93 while (window.performance.now() - startedAt < timeoutMs) {
94 if (predicate()) {
95 return true
96 }
97 await nextFrame()
98 }
99
100 return false
101}
102
103function BenchmarkFixture({ version, count, place }: FixtureState) {
104 const TooltipComponent = version === 'v5' ? TooltipV5 : TooltipV6

Callers 1

runScalingBenchmarkFunction · 0.85

Calls 1

nextFrameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…