<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/DispatchSourceTimer",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "c:objc(pl)OS_dispatch_source_timer"
  },
  "title" : "DispatchSourceTimer"
}
-->

# DispatchSourceTimer

A dispatch source that submits the event handler block based on a timer.

```
protocol DispatchSourceTimer : DispatchSourceProtocol, Sendable
```

## Overview

You do not adopt this protocol in your objects. Instead, use the [`makeTimerSource(flags:queue:)`](/documentation/Dispatch/DispatchSource/makeTimerSource(flags:queue:)) method to create an object that adopts this protocol.

## Topics

### Scheduling the Timer Trigger Conditions

[`schedule(deadline:repeating:leeway:)`](/documentation/Dispatch/DispatchSourceTimer/schedule(deadline:repeating:leeway:)-hvhp)

Schedules a timer with the specified deadline, repeat interval, and leeway values.

[`schedule(deadline:repeating:leeway:)`](/documentation/Dispatch/DispatchSourceTimer/schedule(deadline:repeating:leeway:)-24w9r)

Schedules a timer with the specified deadline, repeat interval, and leeway values.

[`schedule(wallDeadline:repeating:leeway:)`](/documentation/Dispatch/DispatchSourceTimer/schedule(wallDeadline:repeating:leeway:)-7c4d7)

Schedules a timer with the specified time, repeat interval, and leeway values.

[`schedule(wallDeadline:repeating:leeway:)`](/documentation/Dispatch/DispatchSourceTimer/schedule(wallDeadline:repeating:leeway:)-21bay)

Schedules a timer with the specified time, repeat interval, and leeway values.

### Deprecated

[`scheduleOneshot(deadline:leeway:)`](/documentation/Dispatch/DispatchSourceTimer/scheduleOneshot(deadline:leeway:))

Schedules a timer to fire once with the specified deadline and leeway values.

[`scheduleOneshot(wallDeadline:leeway:)`](/documentation/Dispatch/DispatchSourceTimer/scheduleOneshot(wallDeadline:leeway:))

Schedules a timer to fire once with the specified deadline and leeway values.

[`scheduleRepeating(deadline:interval:leeway:)`](/documentation/Dispatch/DispatchSourceTimer/scheduleRepeating(deadline:interval:leeway:)-3k199)

Schedules a repeating timer with the specified deadline, repeat interval, and leeway values.

[`scheduleRepeating(deadline:interval:leeway:)`](/documentation/Dispatch/DispatchSourceTimer/scheduleRepeating(deadline:interval:leeway:)-4wtot)

Schedules a repeating timer with the specified deadline, repeat interval, and leeway values.

[`scheduleRepeating(wallDeadline:interval:leeway:)`](/documentation/Dispatch/DispatchSourceTimer/scheduleRepeating(wallDeadline:interval:leeway:)-6fiox)

Schedules a repeating timer with the specified time, repeat interval, and leeway values.

[`scheduleRepeating(wallDeadline:interval:leeway:)`](/documentation/Dispatch/DispatchSourceTimer/scheduleRepeating(wallDeadline:interval:leeway:)-942p7)

Schedules a repeating timer with the specified time, repeat interval, and leeway values.

## Relationships

### Inherits From

[`Sendable`](/documentation/Swift/Sendable)

[`DispatchSourceProtocol`](/documentation/Dispatch/DispatchSourceProtocol)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Conforming Types

[`DispatchSource`](/documentation/Dispatch/DispatchSource)

---

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)