mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
globals module added with setTimeout implementation for both iOS and Android
This commit is contained in:
10
globals/globals.android.ts
Normal file
10
globals/globals.android.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Android specific global functions implementation.
|
||||
*/
|
||||
export function setTimeout(callback: Function, milliseconds: number): void {
|
||||
new android.os.Handler(android.os.Looper.getMainLooper()).postDelayed(
|
||||
new java.lang.Runnable({
|
||||
run: function () { callback(); }
|
||||
}),
|
||||
long(milliseconds));
|
||||
}
|
||||
Reference in New Issue
Block a user