---
title: "wait(timeout:)"
framework: dispatch
role: symbol
role_heading: Instance Method
path: "dispatch/dispatchgroup/wait(timeout:)"
---

# wait(timeout:)

Waits synchronously for the previously submitted work to complete, and returns if the work is not completed before the specified timeout period has elapsed.

## Declaration

```swift
func wait(timeout: DispatchTime) -> DispatchTimeoutResult
```

## Parameters

- `timeout`: The latest time to wait for a group to complete.

## Return Value

Return Value A result value indicating whether the method returned due to a timeout.

## See Also

### Waiting for Tasks to Finish Executing

- [wait()](dispatch/dispatchgroup/wait().md)
- [wait(wallTimeout:)](dispatch/dispatchgroup/wait(walltimeout:).md)
