mirror of
				https://github.com/NativeScript/NativeScript.git
				synced 2025-11-04 12:58:38 +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" });
 |