diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-02-25 09:14:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-25 09:14:27 -0500 |
commit | 91b606aaae23bcb790b55adc5fe70a182a37d564 (patch) | |
tree | 16b56a21ffcb3991569eda984fbd14073bdbd3ae /cli/js/timers.ts | |
parent | 805992b14a65a6dbfb857dea6d9b657477de043d (diff) |
Clean up how we use opIds (#4118)
Diffstat (limited to 'cli/js/timers.ts')
-rw-r--r-- | cli/js/timers.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/js/timers.ts b/cli/js/timers.ts index da8fc7a22..a92896efd 100644 --- a/cli/js/timers.ts +++ b/cli/js/timers.ts @@ -1,6 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert } from "./util.ts"; -import * as dispatch from "./dispatch.ts"; import { sendSync, sendAsync } from "./dispatch_json.ts"; import { RBTree } from "./rbtree.ts"; @@ -27,7 +26,7 @@ const dueTree = new RBTree<DueNode>((a, b) => a.due - b.due); function clearGlobalTimeout(): void { globalTimeoutDue = null; - sendSync(dispatch.OP_GLOBAL_TIMER_STOP); + sendSync("op_global_timer_stop"); } let pendingEvents = 0; @@ -44,7 +43,7 @@ async function setGlobalTimeout(due: number, now: number): Promise<void> { // Send message to the backend. globalTimeoutDue = due; pendingEvents++; - await sendAsync(dispatch.OP_GLOBAL_TIMER, { timeout }); + await sendAsync("op_global_timer", { timeout }); pendingEvents--; // eslint-disable-next-line @typescript-eslint/no-use-before-define fireTimers(); |