Codebase list golang-github-vbauerster-mpb / 3795d56
refactor: alpha to etaAlpha Vladimir Bauer 9 years ago
1 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
1111 type Bar struct {
1212 width int
1313 termWidth int
14 alpha float64
14 etaAlpha float64
1515
1616 fill byte
1717 empty byte
6464 tip: '>',
6565 leftEnd: '[',
6666 rightEnd: ']',
67 alpha: 0.25,
67 etaAlpha: 0.25,
6868 width: width,
6969
7070 incrCh: make(chan int64, 1),
146146 // Defaults to 0.25
147147 // Normally you shouldn't touch this
148148 func (b *Bar) SetEtaAlpha(a float64) *Bar {
149 b.alpha = a
149 b.etaAlpha = a
150150 return b
151151 }
152152
256256 break // break out of select
257257 }
258258 state.timeElapsed = time.Since(timeStarted)
259 state.timePerItem = calcTimePerItemEstimate(state.timePerItem, blockStartTime, b.alpha, i)
259 state.timePerItem = calcTimePerItemEstimate(state.timePerItem, blockStartTime, b.etaAlpha, i)
260260 if n == total {
261261 completed = true
262262 }