(label, count_max=0)
| 83 | |
| 84 | class ProgressReporter |
| 85 | def initialize(label, count_max=0) |
| 86 | @label = label |
| 87 | @count_max = count_max |
| 88 | |
| 89 | @mutex = Thread::Mutex.new |
| 90 | |
| 91 | @time_start = Time.now |
| 92 | @time_previous = Time.now |
| 93 | @count_current = 0 |
| 94 | @count_previous = 0 |
| 95 | end |
| 96 | |
| 97 | def advance |
| 98 | @mutex.synchronize do |