On Sun 25 Jun 2023 04:56:27 PM +08, zhenwei pi wrote: > Use enum ThrottleTimerType instead of number index.
> +typedef enum {
> + THROTTLE_TIMER_READ = 0,
> + THROTTLE_TIMER_WRITE,
> + THROTTLE_TIMER_MAX
> +} ThrottleTimerType;
If you're doing this I suppose you could also change 'bool is_write'
with something like 'ThrottleTimerType timer', i.e
static bool throttle_compute_timer(ThrottleState *ts,
ThrottleTimerType timer,
int64_t now,
int64_t *next_timestamp)
Berto
