fix: global declarations fix (#10247)

This commit is contained in:
farfromrefuge
2023-03-23 17:55:38 +00:00
committed by GitHub
parent 7edd21a688
commit 2f4c318276
16 changed files with 118 additions and 119 deletions

View File

@@ -11,7 +11,7 @@ var countResume = 0;
var countSuspend = 0;
Application.on('displayed', (args) => {
const uptime = global.android ? (<any>org).nativescript.Process.getUpTime : (<any>global).__tns_uptime;
const uptime = global.android ? (<any>org).nativescript.Process.getUpTime : global.__tns_uptime;
console.log('Startup time: ' + uptime() + 'ms.');
});

View File

@@ -295,9 +295,9 @@ function setup(parent?: LayoutBase): Label {
function time(): number {
if (global.android) {
return (<any>global).java.lang.System.nanoTime() / 1000000;
return global.java.lang.System.nanoTime() / 1000000;
} else {
return (<any>global).CACurrentMediaTime() * 1000;
return global.CACurrentMediaTime() * 1000;
}
}