<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/RunLoop/limitDate(forMode:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSRunLoop(im)limitDateForMode:"
  },
  "title" : "limitDate(forMode:)"
}
-->

# limitDate(forMode:)

Performs one pass through the run loop in the specified mode and returns the date at which the next timer is scheduled to fire.

```
func limitDate(forMode mode: RunLoop.Mode) -> Date?
```

## Parameters

`mode`

The run loop mode to search. You may specify custom modes or use one of the modes listed in `Run Loop Modes`.

## Return Value

The date at which the next timer is scheduled to fire, or `nil` if there are no input sources for this mode.

## Discussion

The run loop is entered with an immediate timeout, so the run loop does not block, waiting for input, if no input sources need processing.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)