with RXJs I am trying to achieve something like this:
clickStream.bufferWithTime(500).subscribe(f)clickStream.throttle(500).subscribe(f)
Version 1 calls f every 500ms no matter if there was a clickEvent or not.
Version 2 calls f only if clickStream did send a clickEvent and then stopped for at least 500ms.
I would like to to call f every 500ms as long as clickStream is emitting events. As soon as it does stop to emit, f should called be one last time. If clickStream restarts to emit the same should happen again.