Glossary: Swift Beyond the Basics
Task.sleep
A function that pauses the current task for a given time. It throws a `CancellationError` if the task is canceled, so `try?` is used where the caller can't throw that error.
Glossary: Swift Beyond the Basics
A function that pauses the current task for a given time. It throws a `CancellationError` if the task is canceled, so `try?` is used where the caller can't throw that error.