diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-04-19 09:50:32 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-04-19 09:50:32 -0700 |
commit | 3b725e2f956eae0c557feb43f9531ead4bb5fb32 (patch) | |
tree | 1713a99960b63bdabae89b8bbc546d0a0adb192f /tests/emscripten_api_browser.cpp | |
parent | 7fe2743f8d5295c83738a7eaf0070965ac5c1e69 (diff) |
add emscripten_async_run_script
Diffstat (limited to 'tests/emscripten_api_browser.cpp')
-rw-r--r-- | tests/emscripten_api_browser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/emscripten_api_browser.cpp b/tests/emscripten_api_browser.cpp index 4d425120..0226eae5 100644 --- a/tests/emscripten_api_browser.cpp +++ b/tests/emscripten_api_browser.cpp @@ -9,7 +9,7 @@ int last = 0; extern "C" { -void third() { +void __attribute__((used)) third() { int now = SDL_GetTicks(); printf("thard! %d\n", now); assert(fabs(now - last - 1000) < 500); @@ -22,7 +22,7 @@ void second() { printf("sacond! %d\n", now); assert(fabs(now - last - 500) < 250); last = now; - emscripten_async_call(third, 1000); + emscripten_async_run_script("_third()", 1000); } } |