()
| 24 | |
| 25 | // internal render function |
| 26 | render(){ |
| 27 | // stop timer |
| 28 | if (this.timer){ |
| 29 | clearTimeout(this.timer); |
| 30 | this.timer = null; |
| 31 | } |
| 32 | |
| 33 | // run internal rendering |
| 34 | super.render(); |
| 35 | |
| 36 | // add new line in notty mode! |
| 37 | if (this.options.noTTYOutput && this.terminal.isTTY() === false){ |
| 38 | this.terminal.newline(); |
| 39 | } |
| 40 | |
| 41 | // next update |
| 42 | this.timer = setTimeout(this.render.bind(this), this.schedulingRate); |
| 43 | } |
| 44 | |
| 45 | update(current, payload){ |
| 46 | // timer inactive ? |