summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatherine <whitequark@whitequark.org>2023-02-23 01:14:48 +0000
committerCatherine <whitequark@whitequark.org>2023-02-23 01:14:48 +0000
commitf89df8087d76ec666b6b0509614958e3a5f7d4cd (patch)
treeaac5f3082e37534b0d5a04c487749cb36f286b63
parenta8f0ef2368aa56b3ad20a52298a02e63b2a93e2d (diff)
downloadabc-f89df8087d76ec666b6b0509614958e3a5f7d4cd.tar.gz
abc-f89df8087d76ec666b6b0509614958e3a5f7d4cd.tar.bz2
abc-f89df8087d76ec666b6b0509614958e3a5f7d4cd.zip
Add WASI support in Abc_Clock.
-rw-r--r--src/misc/util/abc_global.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc/util/abc_global.h b/src/misc/util/abc_global.h
index 2217bb87..02dfb679 100644
--- a/src/misc/util/abc_global.h
+++ b/src/misc/util/abc_global.h
@@ -334,7 +334,7 @@ static inline abctime Abc_Clock()
#else
#define APPLE_MACH 0
#endif
-#if (defined(LIN) || defined(LIN64)) && !APPLE_MACH && !defined(__MINGW32__)
+#if (defined(LIN) || defined(LIN64)) && !APPLE_MACH && !defined(__MINGW32__) && !defined(__wasm)
struct timespec ts;
if ( clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) < 0 )
return (abctime)-1;