[][src]Function stdweb::web::interval_buffered

pub fn interval_buffered(ms: u32) -> IntervalBuffered

Creates a Stream which will continuously output () every ms milliseconds, until it is dropped.

It might output () a long time after ms milliseconds have passed, but it will never output () before ms milliseconds have passed.

If the consumer isn't ready to receive the (), it will be put into a queue (this queue is very fast, it can handle a very large number of elements).

When the consumer is ready, it will output all of the () from the queue.

That means that if the consumer is too slow, it might receive multiple () at the same time. Or it might receive another () before ms milliseconds have passed for the consumer (because ms milliseconds have passed for the IntervalBuffered).

(JavaScript docs)