diff options
Diffstat (limited to 'system/include/emscripten.h')
-rw-r--r-- | system/include/emscripten.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/system/include/emscripten.h b/system/include/emscripten.h index 4d321b2c..0ce31e9f 100644 --- a/system/include/emscripten.h +++ b/system/include/emscripten.h @@ -23,6 +23,19 @@ extern void emscripten_run_script(const char *script); */ extern void EMSCRIPTEN_COMMENT(const char *text); +/* + * Profiling tools. + * INIT must be called first, with the maximum identifier that + * will be used. BEGIN will add some code that marks + * the beginning of a section of code whose run time you + * want to measure. END will finish such a section. Note: If you + * call begin but not end, you will get invalid data! + * The profiling data will be written out if you call Profile.dump(). + */ +extern void EMSCRIPTEN_PROFILE_INIT(int max); +extern void EMSCRIPTEN_PROFILE_BEGIN(int id); +extern void EMSCRIPTEN_PROFILE_END(int id); + #ifdef __cplusplus } #endif |