This repository was archived by the owner on Dec 15, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ internal extension timespec {
7575
7676 let nanoseconds = decimalValue * billion
7777
78- self . init ( tv_sec: Int ( integerValue) , tv_nsec: Int ( nanoseconds) )
78+ self . init ( tv_sec: . init ( integerValue) , tv_nsec: . init ( nanoseconds) )
7979 }
8080
8181 var timeInterval : SwiftFoundation . TimeInterval {
@@ -108,14 +108,16 @@ internal extension tm {
108108// MARK: - Cross-Platform Support
109109
110110#if canImport(Darwin)
111-
112111internal typealias POSIXMicroseconds = __darwin_suseconds_t
113-
114112#else
113+
114+ #if arch(wasm32)
115+ internal typealias POSIXMicroseconds = Int32
116+ #else
117+ internal typealias POSIXMicroseconds = __suseconds_t
118+ #endif
115119
116- public typealias POSIXMicroseconds = __suseconds_t
117-
118- public func modf( value: Double ) -> ( Double , Double ) {
120+ internal func modf( value: Double ) -> ( Double , Double ) {
119121
120122 var integerValue : Double = 0
121123
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ import Darwin
1212import Glibc
1313#endif
1414
15+ #if !arch(wasm32)
16+
1517/// POSIX Thread
1618public final class Thread {
1719
@@ -120,3 +122,5 @@ fileprivate extension Thread {
120122 }
121123 }
122124}
125+
126+ #endif
You can’t perform that action at this time.
0 commit comments