You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/0329-clock-instant-duration.md
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,8 @@
54
54
* Renamed the `nanoseconds` and `seconds` property of `Duration` to `nanosecondsPortion` and `secondsPortion` to indicate their fractional composition to types like `timespec`
55
55
***v3.1**
56
56
* Adjust the portion accessors to one singular `components` based accessor and add an initializer for raw value construction from components.
57
+
***v3.2**
58
+
* Add `Duration` as an associated type requirement of `Clock`, so that it can be marked as the primary associated type.
57
59
58
60
</details>
59
61
@@ -117,7 +119,8 @@ The base protocol for defining a clock requires two primitives; a way to wake up
117
119
118
120
```swift
119
121
publicprotocolClock: Sendable {
120
-
associatedtypeInstant: InstantProtocol
122
+
associatedtypeDuration: DurationProtocol
123
+
associatedtypeInstant: InstantProtocol where Instant.Duration == Duration
0 commit comments