Skip to content

Conversation

@stephentyrone
Copy link
Contributor

SE-0329 defines the following static factory methods:

public static func seconds<T: BinaryInteger>(_ seconds: T) -> Duration
public static func seconds(_ seconds: Double) -> Duration
public static func milliseconds<T: BinaryInteger>(_ milliseconds: T) -> Duration
public static func milliseconds(_ milliseconds: Double) -> Duration
public static func microseconds<T: BinaryInteger>(_ microseconds: T) -> Duration
public static func microseconds(_ microseconds: Double) -> Duration
public static func nanoseconds<T: BinaryInteger>(_ value: T) -> Duration

For no good reason, the obvious additional method:

public static func nanoseconds(_ nanoseconds: Double) -> Duration

was omitted. After talking this through with the LSG, we have decided that this is simply a bug, and we will add this method without formal evolution review.

SE-0329 defines the following static factory methods:
```
public static func seconds<T: BinaryInteger>(_ seconds: T) -> Duration
public static func seconds(_ seconds: Double) -> Duration
public static func milliseconds<T: BinaryInteger>(_ milliseconds: T) -> Duration
public static func milliseconds(_ milliseconds: Double) -> Duration
public static func microseconds<T: BinaryInteger>(_ microseconds: T) -> Duration
public static func microseconds(_ microseconds: Double) -> Duration
public static func nanoseconds<T: BinaryInteger>(_ value: T) -> Duration
```
For no good reason, the obvious additional method:
```
public static func nanoseconds(_ nanoseconds: Double) -> Duration
```
was omitted. After talking this through with the LSG, we have decided that this is simply a bug, and we will add this method without formal evolution review.
@stephentyrone stephentyrone requested a review from a team as a code owner April 30, 2025 20:02
@stephentyrone
Copy link
Contributor Author

@swift-ci test

@stephentyrone
Copy link
Contributor Author

swift-pm failure is unrelated and fixed here: swiftlang/swift-package-manager#8583

@stephentyrone
Copy link
Contributor Author

@swift-ci smoke test

@stephentyrone stephentyrone merged commit ab2b28c into swiftlang:main May 1, 2025
3 of 5 checks passed
@stephentyrone stephentyrone deleted the duration-nanoseconds branch May 1, 2025 19:50
stephentyrone added a commit that referenced this pull request May 2, 2025
SE-0329 defines the following static factory methods:
```
public static func seconds<T: BinaryInteger>(_ seconds: T) -> Duration
public static func seconds(_ seconds: Double) -> Duration
public static func milliseconds<T: BinaryInteger>(_ milliseconds: T) -> Duration
public static func milliseconds(_ milliseconds: Double) -> Duration
public static func microseconds<T: BinaryInteger>(_ microseconds: T) -> Duration
public static func microseconds(_ microseconds: Double) -> Duration
public static func nanoseconds<T: BinaryInteger>(_ value: T) -> Duration
```
For no good reason, the obvious additional method:
```
public static func nanoseconds(_ nanoseconds: Double) -> Duration
```
was omitted. After talking this through with the LSG, we have decided
that this is simply a bug, and we will add this method without formal
evolution review.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants