Class: IntervalPacer<E>
A PublishPacer that only allows publishing on an interval.
Type parameters
Name |
---|
E |
Constructors
constructor
• new IntervalPacer<E
>(msec
): IntervalPacer
<E
>
Create an IntervalPacer.
Type parameters
Name |
---|
E |
Parameters
Name | Type | Description |
---|---|---|
msec | number | Time to wait between publishs in ms |
Returns
Defined in
src/sdk/data/EventBusPacer.ts:23
Methods
canPublish
▸ canPublish<K
>(topic
, data
): boolean
Determine whether the data can be published based on the time since its prior publish.
Type parameters
Name | Type |
---|---|
K | extends string | number | symbol |
Parameters
Name | Type | Description |
---|---|---|
topic | keyof E | The topic data would be sent on. |
data | E [K ] | The data which would be sent. |
Returns
boolean
A bool indicating if the data should be published.
Defined in
src/sdk/data/EventBusPacer.ts:35