You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/SignalProtocol+Filtering.swift
+58-31Lines changed: 58 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -374,44 +374,71 @@ extension SignalProtocol {
374
374
}
375
375
}
376
376
377
-
/// Throttle the signal to emit at most one element per given `seconds` interval. Signal will emit latest element from each interval.
377
+
/// Throttle the signal to emit at most one element per given `seconds` interval. Emits either the most-recent or first element in the specified time interval.
378
+
///
379
+
/// - parameter seconds: The interval at which to find and emit either the most recent or the first element.
380
+
/// - parameter latest: Defaults to `true`. A Bool value that indicates whether to publish the most recent element. If `false`, it emits the first element received during the interval. If `true` Signal will emit latest element from each interval.
378
381
///
379
382
/// Check out interactive example at [https://rxmarbles.com/#throttle](https://rxmarbles.com/#throttle)
0 commit comments