---
title: Publishers.CollectByTime
framework: combine
role: symbol
role_heading: Structure
path: combine/publishers/collectbytime
---

# Publishers.CollectByTime

A publisher that buffers and periodically publishes its items.

## Declaration

```swift
struct CollectByTime<Upstream, Context> where Upstream : Publisher, Context : Scheduler
```

## Topics

### Creating a collect by time Publisher

- [init(upstream:strategy:options:)](combine/publishers/collectbytime/init(upstream:strategy:options:).md)

### Declaring supporting types

- [Publishers.CollectByTime.Output](combine/publishers/collectbytime/output.md)
- [Publishers.CollectByTime.Failure](combine/publishers/collectbytime/failure.md)

### Inspecting publisher properties

- [upstream](combine/publishers/collectbytime/upstream.md)
- [strategy](combine/publishers/collectbytime/strategy.md)
- [options](combine/publishers/collectbytime/options.md)

## Relationships

### Conforms To

- [Publisher](combine/publisher.md)

## See Also

### Reducing elements

- [Publishers.Collect](combine/publishers/collect.md)
- [Publishers.CollectByCount](combine/publishers/collectbycount.md)
- [Publishers.TimeGroupingStrategy](combine/publishers/timegroupingstrategy.md)
- [Publishers.IgnoreOutput](combine/publishers/ignoreoutput.md)
- [Publishers.Reduce](combine/publishers/reduce.md)
- [Publishers.TryReduce](combine/publishers/tryreduce.md)
