diff options
author | Stanislav <62983943+stanislavstrelnikov@users.noreply.github.com> | 2020-07-07 04:45:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-06 21:45:39 -0400 |
commit | 158ae0bfe900d2bac3076390c4fe3d2b54d94fe5 (patch) | |
tree | 209e4b5682e2a899041767c49428e34329e48084 /cli/js/ops/timers.ts | |
parent | ab4c574f5202f607ceb6068f56b3cc8aed1bbbaf (diff) |
clean up code in cli/js (#6611)
Diffstat (limited to 'cli/js/ops/timers.ts')
-rw-r--r-- | cli/js/ops/timers.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cli/js/ops/timers.ts b/cli/js/ops/timers.ts index 1a7081df0..2fdbd6851 100644 --- a/cli/js/ops/timers.ts +++ b/cli/js/ops/timers.ts @@ -1,6 +1,12 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + import { sendSync, sendAsync } from "./dispatch_json.ts"; +interface NowResponse { + seconds: number; + subsecNanos: number; +} + export function stopGlobalTimer(): void { sendSync("op_global_timer_stop"); } @@ -9,11 +15,6 @@ 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"); } |