caarlos0 / timer

A `sleep` with progress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configurable Update interval

NyCodeGHG opened this issue · comments

commented

I think it would be pretty cool for shorter durations, to increase the update interval to be more than once per second.

commented

I played a bit around with the code, but it's not fancy as i thought using shorter update intervals. Also there are some issues with floating point numbers when using a really low update interval.

maybe we can auto tune it, e.g. if duration <1m, refresh every 100ms, if its >1m, every 1s

wdyt?

commented

that sounds good