1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-13 11:02:19 -05:00
denoland-deno/cli/js/web/performance.ts

11 lines
256 B
TypeScript
Raw Normal View History

2020-01-02 15:13:47 -05:00
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
2020-07-06 21:45:39 -04:00
import { now as opNow } from "../ops/timers.ts";
2019-02-02 01:27:42 -05:00
export class Performance {
now(): number {
const res = opNow();
2019-08-26 08:50:21 -04:00
return res.seconds * 1e3 + res.subsecNanos / 1e6;
2019-02-02 01:27:42 -05:00
}
}