public class Timers extends Object
| Constructor and Description |
|---|
Timers() |
| Modifier and Type | Method and Description |
|---|---|
void |
install(Scriptable scope)
Initialize the "setTimeout" and "clearTimeout" functions on the specified scope.
|
void |
runAllTimers(Context cx,
Scriptable scope)
Execute all pending timers and microtasks, blocking the thread if we need to wait for any
timers to time out.
|
public void install(Scriptable scope)
scope - the scope where the functions should be definedpublic void runAllTimers(Context cx, Scriptable scope) throws InterruptedException
cx - The Context to use to execute microtasks and timer functionsscope - the global scopeInterruptedException - if the thread is interrupted while sleepingCopyright © 2025 HtmlUnit. All rights reserved.