// creates a channel that, after receiving any event on the first parameter chan, and until any event on second chan parameter, regularly receives when events.
// creates a channel that, after receiving any event on the first parameter chan, and until any event on second chan parameter, regularly receives 'when' events.
// the repeat interval is DefaultRepeat, and is stored, so retriggering is not effected by changing DefaultRepeat.