mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 12:57:42 +08:00
Fix uptime with snapshot (#4466)
This commit is contained in:
@ -3,7 +3,9 @@ declare var __stopCPUProfiler: any;
|
|||||||
|
|
||||||
import { TimerInfo as TimerInfoDefinition, InstrumentationMode } from ".";
|
import { TimerInfo as TimerInfoDefinition, InstrumentationMode } from ".";
|
||||||
|
|
||||||
export const uptime = global.android ? (<any>org).nativescript.Process.getUpTime : (<any>global).__tns_uptime;
|
export function uptime() {
|
||||||
|
return global.android ? (<any>org).nativescript.Process.getUpTime() : (<any>global).__tns_uptime();
|
||||||
|
}
|
||||||
|
|
||||||
interface TimerInfo extends TimerInfoDefinition {
|
interface TimerInfo extends TimerInfoDefinition {
|
||||||
totalTime: number;
|
totalTime: number;
|
||||||
|
Reference in New Issue
Block a user