move RR method up
Vladimir Bauer
9 years ago
| 64 | 64 | return p |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | // RefreshRate overrides default (30ms) refreshRate value | |
| 68 | func (p *progress) RefreshRate(d time.Duration) *progress { | |
| 69 | p.interval <- d | |
| 70 | return p | |
| 71 | } | |
| 72 | ||
| 67 | 73 | // AddBar creates a new progress bar and adds to the container |
| 68 | 74 | func (p *progress) AddBar(total int) *Bar { |
| 69 | 75 | p.wg.Add(1) |
| 77 | 83 | result := make(chan bool) |
| 78 | 84 | p.op <- &operation{barRemove, b, result} |
| 79 | 85 | return <-result |
| 80 | } | |
| 81 | ||
| 82 | // RefreshRate overrides default (30ms) refreshRate value | |
| 83 | func (p *progress) RefreshRate(d time.Duration) *progress { | |
| 84 | p.interval <- d | |
| 85 | return p | |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | // WaitAndStop stops listening |