---
title: "sleep(for:tolerance:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/suspendingclock/sleep(for:tolerance:)"
---

# sleep(for:tolerance:)

Suspends for the given duration.

## Declaration

```swift
func sleep(for duration: Self.Instant.Duration, tolerance: Self.Instant.Duration? = nil) async throws
```

## Discussion

Discussion Prefer to use the sleep(until:tolerance:) method on Clock if you have access to an absolute instant.
