danschultz / stream_transformers

A Dart package for transforming streams
MIT License
12 stars 9 forks source link

Add SamplePeriodically #3

Closed danschultz closed 9 years ago

danschultz commented 9 years ago

Samples the source stream repeatedly for each duration.

Example:

var source = new StreamController();
var sampled = source.transform(new SamplePeriodically(new Duration(seconds: 1)));