Skip to content

Commit f96567c

Browse files
fabianfettktoso
andauthored
Update docs/async-await.md
Co-authored-by: Konrad `ktoso` Malawski <[email protected]>
1 parent e2f078e commit f96567c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/async-await.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ extension HTTPClient {
150150
let response = try await httpClient.execute(request, deadline: .distantFuture)
151151
}
152152
153-
Task.sleep(500 * 1000 * 1000) // wait half a second
153+
await Task.sleep(nanosecond: 500 * 1000 * 1000) // wait half a second
154154
task.cancel() // cancel the task after half a second
155155
```
156156

0 commit comments

Comments
 (0)