| 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 | |
| 113 | namespace Babylon::Polyfills::Window |
no test coverage detected