mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
@@ -43,13 +43,13 @@ export function test_setTimeout_extraArgs() {
|
||||
let completed: boolean;
|
||||
let rnd: number = Math.random();
|
||||
|
||||
// >> timer-set-zero
|
||||
// >> timer-set-zero-args
|
||||
const id = timer.setTimeout((arg) => {
|
||||
// >> (hide)
|
||||
completed = rnd === arg;
|
||||
// << (hide)
|
||||
}, 0, rnd);
|
||||
// << timer-set-zero
|
||||
// << timer-set-zero-args
|
||||
|
||||
TKUnit.waitUntilReady(() => completed, 0.5, false);
|
||||
timer.clearTimeout(id);
|
||||
|
||||
@@ -12,6 +12,9 @@ previous_url: /ApiReference/timer/HOW-TO
|
||||
### Evaluates an expression after 0 milliseconds.
|
||||
{%snippet timer-set-zero%}
|
||||
|
||||
### Evaluates an expression after 0 milliseconds.
|
||||
{%snippet timer-set-zero-args%}
|
||||
|
||||
### Evaluates an expression after a specified number of milliseconds.
|
||||
{%snippet timer-set-ten%}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user