move(command) {
        let elem = document.getElementById("progressBar");
        let width = 0;
        let id = setInterval(frame.bind(this), this.state.trainingTime / 100); // 1% of training time

        function frame() {
            if (width >= 100) {
                elem.style.width = 0 + "%";
                clearInterval(id);
                this.trainCommand(command);
            } else {
                width++;
                elem.style.width = width + "%";
            }
        }
    }
//progress bar training time and call trainCommand if time is passed
progress bar training time and call trainCommand if time is passed
progress bar training time and call trainCommand if time is passed
move(command) {
        let elem = document.getElementById("progressBar");
        let width = 0;
        let id = setInterval(frame.bind(this), this.state.trainingTime / 100); 
        function frame() {
            if (width >= 100) {
                elem.style.width = 0 + "%";
                clearInterval(id);
                this.trainCommand(command);
            } else {
                width++;
                elem.style.width = width + "%";
            }
        }
    }
move ( command ) { let elem = document . getElementById ( "progressBar" ) ; let width = 0 ; let id = setInterval ( frame . bind ( this ) , this . state . trainingTime / 100 ) ; function frame ( ) { if ( width >= 100 ) { elem . style . width = 0 + "%" ; clearInterval ( id ) ; this . trainCommand ( command ) ; } else { width ++ ; elem . style . width = width + "%" ; } } }
progress bar training time and call trainCommand if time is passed
progress bar training time and call trainCommand if time is passed
// 1% of training time