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 27
27
#endif
28
28
#endif
29
29
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
31
31
#include <sys/time.h>
32
32
#endif
33
33
@@ -115,7 +115,7 @@ CF_EXPORT CFTimeInterval CFGetSystemUptime(void) {
115
115
#if TARGET_OS_MAC
116
116
uint64_t tsr = mach_absolute_time ();
117
117
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
119
119
struct timespec res ;
120
120
if (clock_gettime (CLOCK_MONOTONIC , & res ) != 0 ) {
121
121
HALT ;
@@ -177,7 +177,7 @@ CF_PRIVATE void __CFDateInitialize(void) {
177
177
}
178
178
__CFTSRRate = (double )freq .QuadPart ;
179
179
__CF1_TSRRate = 1.0 / __CFTSRRate ;
180
- #elif TARGET_OS_LINUX || TARGET_OS_BSD
180
+ #elif TARGET_OS_LINUX || TARGET_OS_BSD || TARGET_OS_WASI
181
181
struct timespec res ;
182
182
if (clock_getres (CLOCK_MONOTONIC , & res ) != 0 ) {
183
183
HALT ;
You can’t perform that action at this time.
0 commit comments