Instead of rows 100 - 109 I would prefer something like this:
-> this.delay = Math.round(millis * factor / 100.0);
or another option: this.delay = millis * factor / 100 + 1;
1 millisecond does not make much difference ;)