I am looking to dynamically adjust the delay of an interval, but my knowledge of Angular is limited which is hindering my progress in this task.
Below is the current code snippet I am working with:
timeDiffs : number[] = [] <== this array contains time measurements in milliseconds
this.interval$ = interval(this.timeDiffs[this.intervalCounter++]).subscribe(() => {
//function call
this.intervalCounter++; // move to next index for next iteration with a different time
})