From a4ddb134fdb8e3d8061e0f3f7459fe9e4ea0bcb3 Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Fri, 9 May 2014 16:46:46 +0300 Subject: [PATCH] setTimeout added in android utils --- Utils/utils_android.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Utils/utils_android.ts b/Utils/utils_android.ts index 3acfe9f2f..ceed383ed 100644 --- a/Utils/utils_android.ts +++ b/Utils/utils_android.ts @@ -21,4 +21,12 @@ return arr; } +} + +export function setTimeout(callback, milliseconds) { + new android.os.Handler(android.os.Looper.getMainLooper()).postDelayed( + new java.lang.Runnable({ + run: function () { callback(); } + }), + milliseconds); } \ No newline at end of file