mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
14 lines
367 B
TypeScript
14 lines
367 B
TypeScript
import * as application from "tns-core-modules/application";
|
|
declare var CACurrentMediaTime;
|
|
|
|
(<any>global).time = function(): number {
|
|
if (global.android) {
|
|
return java.lang.System.nanoTime() / 1000000; // 1 ms = 1000000 ns
|
|
}
|
|
else {
|
|
return CACurrentMediaTime() * 1000;
|
|
}
|
|
}
|
|
|
|
application.start({ moduleName: "css-perf-test/root" });
|