Fix: [Emscripten] using TIC/TOC on this platform is silly

Stop throwing a warning about this, as it is not likely we will
ever implement it.
This commit is contained in:
Patric Stout 2020-12-25 20:06:37 +01:00 committed by Patric Stout
parent e0b953b804
commit 6aef1164a4
1 changed files with 6 additions and 0 deletions

View File

@ -66,6 +66,12 @@ uint64 ottd_rdtsc()
# define RDTSC_AVAILABLE
#endif
#if defined(__EMSCRIPTEN__) && !defined(RDTSC_AVAILABLE)
/* On emscripten doing TIC/TOC would be ill-advised */
uint64 ottd_rdtsc() {return 0;}
# define RDTSC_AVAILABLE
#endif
/* In all other cases we have no support for rdtsc. No major issue,
* you just won't be able to profile your code with TIC()/TOC() */
#if !defined(RDTSC_AVAILABLE)