scheduleDelay function

int scheduleDelay(
  1. List<int> table,
  2. int attempt
)

固定的重试间隔表(秒),超出表长取最后一项。

Implementation

int scheduleDelay(List<int> table, int attempt) => table[math.min(attempt, table.length - 1)] * 1000;