We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f1018f commit 5f41d74Copy full SHA for 5f41d74
Sources/Testing/Events/TimeValue.swift
@@ -81,6 +81,10 @@ extension TimeValue: Codable {}
81
82
extension TimeValue: CustomStringConvertible {
83
var description: String {
84
+#if os(WASI)
85
+ // BUG: https://github.com/swiftlang/swift/issues/72398
86
+ return String(describing: Duration(self))
87
+#else
88
let (secondsFromAttoseconds, attosecondsRemaining) = attoseconds.quotientAndRemainder(dividingBy: 1_000_000_000_000_000_000)
89
let seconds = seconds + secondsFromAttoseconds
90
var milliseconds = attosecondsRemaining / 1_000_000_000_000_000
@@ -94,6 +98,7 @@ extension TimeValue: CustomStringConvertible {
94
98
}
95
99
return String(cString: buffer.baseAddress!)
96
100
101
+#endif
97
102
103
104
0 commit comments