File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
CoreFoundation/NumberDate.subproj Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2727#endif
2828#endif
2929
30- #if TARGET_OS_MAC || TARGET_OS_LINUX || TARGET_OS_BSD
30+ #if TARGET_OS_MAC || TARGET_OS_LINUX || TARGET_OS_BSD || TARGET_OS_WASI
3131#include <sys/time.h>
3232#endif
3333
@@ -115,7 +115,7 @@ CF_EXPORT CFTimeInterval CFGetSystemUptime(void) {
115115#if TARGET_OS_MAC
116116 uint64_t tsr = mach_absolute_time ();
117117 return (CFTimeInterval )((double )tsr * __CF1_TSRRate );
118- #elif TARGET_OS_LINUX || TARGET_OS_BSD
118+ #elif TARGET_OS_LINUX || TARGET_OS_BSD || TARGET_OS_WASI
119119 struct timespec res ;
120120 if (clock_gettime (CLOCK_MONOTONIC , & res ) != 0 ) {
121121 HALT ;
@@ -177,7 +177,7 @@ CF_PRIVATE void __CFDateInitialize(void) {
177177 }
178178 __CFTSRRate = (double )freq .QuadPart ;
179179 __CF1_TSRRate = 1.0 / __CFTSRRate ;
180- #elif TARGET_OS_LINUX || TARGET_OS_BSD
180+ #elif TARGET_OS_LINUX || TARGET_OS_BSD || TARGET_OS_WASI
181181 struct timespec res ;
182182 if (clock_getres (CLOCK_MONOTONIC , & res ) != 0 ) {
183183 HALT ;
You can’t perform that action at this time.
0 commit comments