MCPcopy Create free account
hub / github.com/npkgz/cli-progress / constructor

Method constructor

lib/eta.js:5–15  ·  view source on GitHub ↗
(length, initTime, initValue)

Source from the content-addressed store, hash-verified

3class ETA{
4
5 constructor(length, initTime, initValue){
6 // size of eta buffer
7 this.etaBufferLength = length || 100;
8
9 // eta buffer with initial values
10 this.valueBuffer = [initValue];
11 this.timeBuffer = [initTime];
12
13 // eta time value
14 this.eta = '0';
15 }
16
17 // add new values to calculation buffer
18 update(time, value, total){

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected