globals module added with setTimeout implementation for both iOS and Android

This commit is contained in:
Vladimir Enchev
2014-05-10 13:15:37 +03:00
parent 44c51a0e48
commit 2d701fb5a4
7 changed files with 39 additions and 8 deletions

View 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));
}