Skip to content

Commit a749368

Browse files
committed
Make the new TimePoint.seconds() input explicitly Int64, else it breaks when compiling for
32-bit armv7 with large inputs.
1 parent 6c71f58 commit a749368

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/SwiftDriver/Utilities/DateAdditions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public struct TimePoint: Equatable, Comparable, Hashable {
3939
}
4040

4141
extension TimePoint {
42-
public static func seconds(_ value: Int) -> TimePoint {
42+
public static func seconds(_ value: Int64) -> TimePoint {
4343
precondition(value >= 0,
4444
"Duration value in seconds is \(value), but cannot be negative")
4545
return TimePoint(seconds: UInt64(value), nanoseconds: 0)
@@ -97,7 +97,7 @@ extension TimePoint{
9797
let result: UInt64 = (UInt64(ftTime.dwLowDateTime) << 0)
9898
+ (UInt64(ftTime.dwHighDateTime) << 32)
9999
// Windows ticks in 100 nanosecond intervals.
100-
return .seconds(Int(result / 10_000_000))
100+
return .seconds(Int64(result / 10_000_000))
101101
#else
102102
var tv = timeval()
103103
gettimeofday(&tv, nil)

0 commit comments

Comments
 (0)