summaryrefslogtreecommitdiff
path: root/cli/ops/timers.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-02-25 09:14:27 -0500
committerGitHub <noreply@github.com>2020-02-25 09:14:27 -0500
commit91b606aaae23bcb790b55adc5fe70a182a37d564 (patch)
tree16b56a21ffcb3991569eda984fbd14073bdbd3ae /cli/ops/timers.rs
parent805992b14a65a6dbfb857dea6d9b657477de043d (diff)
Clean up how we use opIds (#4118)
Diffstat (limited to 'cli/ops/timers.rs')
-rw-r--r--cli/ops/timers.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/cli/ops/timers.rs b/cli/ops/timers.rs
index b9a7dbdf7..33aa7f828 100644
--- a/cli/ops/timers.rs
+++ b/cli/ops/timers.rs
@@ -1,7 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use super::dispatch_json::{Deserialize, JsonOp, Value};
use crate::op_error::OpError;
-use crate::ops::json_op;
use crate::state::State;
use deno_core::*;
use futures::future::FutureExt;
@@ -11,14 +10,11 @@ use std::time::Instant;
pub fn init(i: &mut Isolate, s: &State) {
i.register_op(
- "global_timer_stop",
- s.core_op(json_op(s.stateful_op(op_global_timer_stop))),
+ "op_global_timer_stop",
+ s.stateful_json_op(op_global_timer_stop),
);
- i.register_op(
- "global_timer",
- s.core_op(json_op(s.stateful_op(op_global_timer))),
- );
- i.register_op("now", s.core_op(json_op(s.stateful_op(op_now))));
+ i.register_op("op_global_timer", s.stateful_json_op(op_global_timer));
+ i.register_op("op_now", s.stateful_json_op(op_now));
}
fn op_global_timer_stop(