aboutsummaryrefslogtreecommitdiff
path: root/src/library_sdl.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/library_sdl.js')
-rw-r--r--src/library_sdl.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js
index ce26a106..511882dd 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -555,5 +555,15 @@ mergeInto(LibraryManager.library, {
// SDL Mixer
Mix_OpenAudio: function() { return -1 },
+
+ SDL_AddTimer: function(interval, callback, param) {
+ return window.setTimeout(function() {
+ FUNCTION_TABLE[callback](interval, param);
+ }, interval);
+ },
+ SDL_RemoveTimer: function(id) {
+ window.clearTimeout(id);
+ return true;
+ },
});