Reflect actual single bar example
Vladimir Bauer
8 years ago
| 61 | 61 |
)
|
| 62 | 62 |
|
| 63 | 63 |
for i := 0; i < total; i++ {
|
| 64 | |
time.Sleep(time.Duration(rand.Intn(100)) * time.Millisecond)
|
| 65 | |
bar.Incr(1) // increment progress bar
|
|
64 |
time.Sleep(time.Duration(rand.Intn(10)+1) * time.Second / 100)
|
|
65 |
bar.Increment()
|
| 66 | 66 |
}
|
| 67 | 67 |
|
| 68 | 68 |
p.Stop()
|