pub fn interval<T>(period: T) -> Intervalwhere T: Into<Millis>,
Creates an Interval that ticks every period.
Interval
period
The first tick completes immediately, and each later tick completes period after the previous one was observed. An interval will tick indefinitely. At any time, the Interval value can be dropped. This cancels the interval.