diff options
Diffstat (limited to 'cli/js/ops/timers.ts')
-rw-r--r-- | cli/js/ops/timers.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/js/ops/timers.ts b/cli/js/ops/timers.ts index bc7fe6453..1a7081df0 100644 --- a/cli/js/ops/timers.ts +++ b/cli/js/ops/timers.ts @@ -8,3 +8,12 @@ export function stopGlobalTimer(): void { export async function startGlobalTimer(timeout: number): Promise<void> { await sendAsync("op_global_timer", { timeout }); } + +interface NowResponse { + seconds: number; + subsecNanos: number; +} + +export function now(): NowResponse { + return sendSync("op_now"); +} |