MCPcopy Create free account
hub / github.com/dop251/goja_nodejs / SetTimeout

Method SetTimeout

eventloop/eventloop.go:163–174  ·  view source on GitHub ↗

SetTimeout schedules to run the specified function in the context of the loop as soon as possible after the specified timeout period. SetTimeout returns a Timer which can be passed to ClearTimeout. The instance of goja.Runtime that is passed to the function and any Values derived from it must not be

(fn func(*goja.Runtime), timeout time.Duration)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 7

TestNativeTimeoutFunction · 0.95
TestNativeClearTimeoutFunction · 0.95
TestSetTimeoutConcurrentFunction · 0.95
TestEventLoop_StopNoWaitFunction · 0.95
TestEventLoop_TerminateFunction · 0.95

Calls 3

newTimeoutMethod · 0.95
addAuxJobMethod · 0.95
startMethod · 0.45

Tested by 7

TestNativeTimeoutFunction · 0.76
TestNativeClearTimeoutFunction · 0.76
TestSetTimeoutConcurrentFunction · 0.76
TestEventLoop_StopNoWaitFunction · 0.76
TestEventLoop_TerminateFunction · 0.76