MCPcopy Create free account
hub / github.com/tensorflow/tfjs / nextFrame

Function nextFrame

tfjs-core/src/browser_util.ts:37–39  ·  view source on GitHub ↗

* Returns a promise that resolves when a requestAnimationFrame has completed. * * On Node.js this uses setImmediate instead of requestAnimationFrame. * * This is simply a sugar method so that users can do the following: * `await tf.nextFrame();` * * @doc {heading: 'Performance', subheading: '

()

Source from the content-addressed store, hash-verified

35 * @doc {heading: 'Performance', subheading: 'Timing'}
36 */
37function nextFrame(): Promise<void> {
38 return new Promise<void>(resolve => delayCallback(() => resolve()));
39}
40
41export {nextFrame};

Callers 2

constructorMethod · 0.90
checkCompletionAsync_Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…