我想动态更改间隔的周期/延迟,但不幸的是,我对Angular 不太熟悉,所以我只能停留在这一部分.
这是我当前的代码:
timeDiffs : number[] = [] <== this is a preprocessed array with the timemeasurements in milliseconds
this.interval$ = interval(this.timeDiffs[this.intervalCounter++]).subscribe(() => {
//some function calling here
this.intervalCounter++; // next index for next iteration with a different time
})