mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
22 lines
588 B
TypeScript
22 lines
588 B
TypeScript
var TAG = 'JS';
|
|
|
|
export var helper_log = function (message: string) {
|
|
android.util.Log.v(TAG, message);
|
|
}
|
|
|
|
export var info = function (message: string) {
|
|
android.util.Log.i(TAG, message);
|
|
}
|
|
|
|
export var error = function (message: string) {
|
|
android.util.Log.e(TAG, message);
|
|
}
|
|
|
|
export var warn = function (message: string) {
|
|
android.util.Log.w(TAG, message);
|
|
}
|
|
|
|
export var timeMillis = function (): number {
|
|
// NOTE: we might need to use currentTimeMillis if we have troubles with the long size
|
|
return java.lang.System.nanoTime() / 1000000; // 1 ms = 1000000 ns
|
|
} |