pointfreeco / swift-clocks

⏰ A few clocks that make working with Swift concurrency more testable and more versatile.
MIT License
266 stars 17 forks source link

Update the default value of ImmediateClock. #29

Closed sanghun0724 closed 9 months ago

sanghun0724 commented 9 months ago

To improve consistency with other clocks and readability of the code, Update the default values of the variables in ImmediateClock.

e.g: TestClock initialization

    public var minimumResolution: Duration = .zero
    public private(set) var now: Instant

    private let lock = NSRecursiveLock()
    private var suspensions:
      [(
        id: UUID,
        deadline: Instant,
        continuation: AsyncThrowingStream<Never, Error>.Continuation
      )] = []

    public init(now: Instant = .init()) {
      self.now = now
    }