From 08b16b3b5aec09331309c66a168071dcca3657d0 Mon Sep 17 00:00:00 2001 From: Panayot Cankov Date: Wed, 28 Jun 2017 15:55:11 +0300 Subject: [PATCH] Fix uptime with snapshot (#4466) --- tns-core-modules/profiling/profiling.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tns-core-modules/profiling/profiling.ts b/tns-core-modules/profiling/profiling.ts index ed132728f..efb5006eb 100644 --- a/tns-core-modules/profiling/profiling.ts +++ b/tns-core-modules/profiling/profiling.ts @@ -3,7 +3,9 @@ declare var __stopCPUProfiler: any; import { TimerInfo as TimerInfoDefinition, InstrumentationMode } from "."; -export const uptime = global.android ? (org).nativescript.Process.getUpTime : (global).__tns_uptime; +export function uptime() { + return global.android ? (org).nativescript.Process.getUpTime() : (global).__tns_uptime(); +} interface TimerInfo extends TimerInfoDefinition { totalTime: number;