---
title: "Publishers.TimeGroupingStrategy.byTimeOrCount(_:_:_:)"
framework: combine
role: symbol
role_heading: Case
path: "combine/publishers/timegroupingstrategy/bytimeorcount(_:_:_:)"
---

# Publishers.TimeGroupingStrategy.byTimeOrCount(_:_:_:)

A grouping that collects and publishes items periodically or when a buffer reaches a maximum size.

## Declaration

```swift
case byTimeOrCount(Context, Context.SchedulerTimeType.Stride, Int)
```

## See Also

### Time groupings

- [Publishers.TimeGroupingStrategy.byTime(_:_:)](combine/publishers/timegroupingstrategy/bytime(_:_:).md)
