mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix: global declarations fix (#10247)
This commit is contained in:
@@ -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.');
|
||||
});
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user