shithub: furgit

ref: 1734207266752b9464f42c31f7728a7e3c692c50
dir: /internal/progress/consume.go/

View raw version
package progress

import "time"

func (meter *Meter) consumeUpdateTick(now time.Time) bool {
	if now.Before(meter.nextUpdateAt) {
		return false
	}

	for !now.Before(meter.nextUpdateAt) {
		meter.nextUpdateAt = meter.nextUpdateAt.Add(updateInterval)
	}

	return true
}