Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Sources/NIOConcurrencyHelpers/lock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,7 @@ public final class ConditionLock<T: Equatable> {
gettimeofday(&curTime, nil)

let allNSecs: Int64 = timeoutNS + Int64(curTime.tv_usec) * 1000
#if canImport(wasi_pthread)
let tvSec = curTime.tv_sec + (allNSecs / nsecPerSec)
#else
let tvSec = curTime.tv_sec + Int((allNSecs / nsecPerSec))
#endif
let tvSec = curTime.tv_sec + time_t((allNSecs / nsecPerSec))

var timeoutAbs = timespec(
tv_sec: tvSec,
Expand Down
2 changes: 1 addition & 1 deletion Sources/NIOPosix/SelectorGeneric.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ extension timespec {
let nsecPerSec: Int64 = 1_000_000_000
let ns = amount.nanoseconds
let sec = ns / nsecPerSec
self = timespec(tv_sec: Int(sec), tv_nsec: Int(ns - sec * nsecPerSec))
self = timespec(tv_sec: time_t(sec), tv_nsec: Int(ns - sec * nsecPerSec))
}
}
#endif
Expand Down
Loading