<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Combine",
  "identifier" : "/documentation/Combine/Publishers/Throttle/init(upstream:interval:scheduler:latest:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Combine"
    ],
    "preciseIdentifier" : "s:7Combine10PublishersO8ThrottleV8upstream8interval9scheduler6latestAEy_xq_Gx_17SchedulerTimeType_6StrideQY_q_Sbtcfc"
  },
  "title" : "init(upstream:interval:scheduler:latest:)"
}
-->

# init(upstream:interval:scheduler:latest:)

Creates a publisher that publishes either the most-recent or first element published by the upstream publisher in a specified time interval.

```
init(upstream: Upstream, interval: Context.SchedulerTimeType.Stride, scheduler: Context, latest: Bool)
```

## Parameters

`upstream`

The publisher from which this publisher receives elements.

`interval`

The interval in which to find and emit the most recent element.

`scheduler`

The scheduler on which to publish elements.

`latest`

A Boolean value indicating whether to publish the most recent element. If `false`, the publisher emits the first element received during the interval.

---

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)