MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / createHandlerAndGetId

Function createHandlerAndGetId

packages/core/timer/index.android.ts:12–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10let timerId = 0;
11
12function createHandlerAndGetId(): number {
13 if (!timeoutHandler) {
14 timeoutHandler = new android.os.Handler(android.os.Looper.myLooper());
15 }
16
17 timerId++;
18
19 return timerId;
20}
21
22export function setTimeout(callback: Function, milliseconds = 0, ...args): number {
23 // Cast to Number

Callers 2

setTimeoutFunction · 0.85
setIntervalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected