I am currently wracking my brain to work out what should probably be a relatively simple per second calculation. I have a loading bar increase and at the end of that, it adds 1 to the total. The loading bar consists of:
wId = setInterval(worker_identify_call, wIdSpeed);
and
function worker_identify_call(){
worker_identify_amount++;
wElem.style.width = worker_identify_amount + '%';
}
wIdSpeed = 250.
I am trying to calculate how long, in seconds, it will take to reach the top of the loading bar (100%).
I currently have ((1000/wIdSpeed).toFixed(2)) but that just calculates how long a cycle of setInterval takes.
Any help is appreciated!