You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func main() {
bar := progressbar.NewOptions(-1,
progressbar.OptionSetDescription("spinnertest"),
progressbar.OptionShowIts(),
progressbar.OptionShowCount(),
progressbar.OptionSpinnerType(7),
)
for i:=0; i < 100; i++ {
bar.Add(1)
time.Sleep(1 * time.Second)
}
}
And I'm expecting that each time it updates, it would move 1 step in the spinner, instead it just flops back and forth between 2 values. If I use spinners with more steps, 1 second intervals also seem to skip steps.
If I change the delay to be time.Sleep(500 * time.Millisecond) it does work and I see all 4 steps, but my proposed usage would be at 1 second intervals. On the other hand, if I go to time.Sleep(2 * time.Second) I get no change in the spinner, although in all situations the count increments correctly.
Is there somewhere I need to set the "total time lapse" of a spinner rotation?
The text was updated successfully, but these errors were encountered:
I'm trying this code:
And I'm expecting that each time it updates, it would move 1 step in the spinner, instead it just flops back and forth between 2 values. If I use spinners with more steps, 1 second intervals also seem to skip steps.
If I change the delay to be
time.Sleep(500 * time.Millisecond)
it does work and I see all 4 steps, but my proposed usage would be at 1 second intervals. On the other hand, if I go totime.Sleep(2 * time.Second)
I get no change in the spinner, although in all situations the count increments correctly.Is there somewhere I need to set the "total time lapse" of a spinner rotation?
The text was updated successfully, but these errors were encountered: