Codebase list golang-github-vbauerster-mpb / 194b772
Comply with rest examples Vladimir Bauer 9 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
3939 bar := p.AddBar(100).AppendPercentage(5, 0)
4040
4141 for bar.InProgress() {
42 time.Sleep(time.Millisecond * 20)
4243 bar.Incr(1)
43 time.Sleep(time.Millisecond * 20)
4444 }
4545 }
4646
6666 go func() {
6767 defer wg.Done()
6868 for i := 0; i < totalItem; i++ {
69 time.Sleep(time.Duration(rand.Intn(totalItem)) * time.Millisecond)
6970 bar.Incr(1)
70 time.Sleep(time.Duration(rand.Intn(totalItem)) * time.Millisecond)
7171 }
7272 }()
7373 }
9797 go func() {
9898 defer wg.Done()
9999 for i := 0; i < totalItem; i++ {
100 time.Sleep(time.Duration(rand.Intn(totalItem)) * time.Millisecond)
100101 bar.Incr(1)
101 time.Sleep(time.Duration(rand.Intn(totalItem)) * time.Millisecond)
102102 }
103103 }()
104104 }