MCPcopy Create free account
hub / github.com/BabylonJS/BabylonNative / RecursiveWaitOrCall

Method RecursiveWaitOrCall

Polyfills/Window/Source/Window.cpp:96–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94 }
95
96 void Window::RecursiveWaitOrCall(
97 std::shared_ptr<Napi::FunctionReference> function,
98 std::chrono::system_clock::time_point whenToRun)
99 {
100 if (std::chrono::system_clock::now() >= whenToRun)
101 {
102 function->Call({});
103 }
104 else
105 {
106 m_runtime.Dispatch([this, function = std::move(function), whenToRun](Napi::Env) {
107 RecursiveWaitOrCall(std::move(function), whenToRun);
108 });
109 }
110 }
111}
112
113namespace Babylon::Polyfills::Window

Callers 1

SetTimeoutMethod · 0.80

Calls 2

CallMethod · 0.80
DispatchMethod · 0.45

Tested by

no test coverage detected