From e0d9400fc0c2a888e43c0acca60995fc4d02a69a Mon Sep 17 00:00:00 2001 From: timfish Date: Fri, 19 Oct 2018 15:00:59 +0200 Subject: [PATCH] Initial commit --- src/index.ts | 2 ++ src/nodejs-pal-builder.ts | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index ef763f2..eb3cc7c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,6 +4,8 @@ import { initializePAL, DOM, PLATFORM, FEATURE, isInitialized } from 'aurelia-pa import { buildPal } from './nodejs-pal-builder'; import { MutationNotifier } from './polyfills/mutation-observer'; +export { ensurePerformance } from './nodejs-pal-builder'; + /** * Initializes the PAL with the NodeJS-targeted implementation. */ diff --git a/src/nodejs-pal-builder.ts b/src/nodejs-pal-builder.ts index aa114ec..d209ce9 100644 --- a/src/nodejs-pal-builder.ts +++ b/src/nodejs-pal-builder.ts @@ -86,8 +86,7 @@ function patchNotifyChange(window: Window) { } -function ensurePerformance(window) { - const startOffset = Date.now ? Date.now() : + (new Date); +export function ensurePerformance(window) { const _entries = []; const _marksIndex = {};