I just wanted to bring up the fact that we don't have a public-use mocked-clock implementation.
This can be very helpful for testing. I personally would have been fine implementing one, and in any case I didn't have much trouble finding an existing implementation and copy-pasting it, but this is still something worth addressing for general users.
I'm thinking such implementation should live somewhere in swift-async-algorithms or swift-algorithms. It sounds like a mocked clock should be in swift-algorithms in theory, but in practice it fits swift-async-algorithms better. 1 proof of this is that swift-async-algorithms contains a mocked clock implementation already, just that it's not exposed to the users of the library.
Some implementations that we currently have:
- in apple/swift-async-algorithms
- Used in library's own tests.
- in vapor/postgres-nio
- Used in library's own tests.
- in pointfreeco/swift-clocks
- This one's actually for public use.