Codebase list golang-github-vbauerster-mpb / c824039
edit comment Vladimir Bauer 6 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
6565 }
6666 ```
6767
68 #### [Rendering multiple bars](_examples/multiBars//main.go)
68 #### [Rendering multiple bars](_examples/multiBars/main.go)
6969 ```go
7070 var wg sync.WaitGroup
7171 // pass &wg (optional), so p will wait for it eventually
9797 max := 100 * time.Millisecond
9898 for i := 0; i < total; i++ {
9999 // start variable is solely for EWMA calculation
100 // EWMA's unit of measure is an iteration's taken time
100 // EWMA's unit of measure is an iteration's duration
101101 start := time.Now()
102102 time.Sleep(time.Duration(rng.Intn(10)+1) * max / 10)
103103 bar.Increment()