mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 23:24:37 +00:00
clean up code in cli/js (#6611)
This commit is contained in:
parent
ab4c574f52
commit
158ae0bfe9
89 changed files with 395 additions and 354 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue