File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -253,11 +253,7 @@ public final class ConditionLock<T: Equatable> {
253
253
gettimeofday ( & curTime, nil )
254
254
255
255
let allNSecs : Int64 = timeoutNS + Int64( curTime. tv_usec) * 1000
256
- #if canImport(wasi_pthread)
257
- let tvSec = curTime. tv_sec + ( allNSecs / nsecPerSec)
258
- #else
259
- let tvSec = curTime. tv_sec + Int( ( allNSecs / nsecPerSec) )
260
- #endif
256
+ let tvSec = curTime. tv_sec + time_t( ( allNSecs / nsecPerSec) )
261
257
262
258
var timeoutAbs = timespec (
263
259
tv_sec: tvSec,
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ extension timespec {
46
46
let nsecPerSec : Int64 = 1_000_000_000
47
47
let ns = amount. nanoseconds
48
48
let sec = ns / nsecPerSec
49
- self = timespec ( tv_sec: Int ( sec) , tv_nsec: Int ( ns - sec * nsecPerSec) )
49
+ self = timespec ( tv_sec: time_t ( sec) , tv_nsec: Int ( ns - sec * nsecPerSec) )
50
50
}
51
51
}
52
52
#endif
You can’t perform that action at this time.
0 commit comments