I want to call function 30 times simultaneously, without any different milliseconds timing, let say there are function name:
orderFlashsaleProduct();
If i call orderFlashsaleProduct(); function 30 times, generally we can use looping method like this:
for(var a = 0; a < 30; a++) {
orderFlashsaleProduct();
}
But "looping method" called function in "sequential way" not "simultaneously". So if we pay attention about timing in milliseconds, there are different timing between call function process.
If we create looping console.log milliseconds of current time it will look like this:
for(var a = 0; a < 30; a++) {
console.log(new Date().getMilliseconds());
}
And printed console.log milliseconds value will look like this:
418
418
418
419
419
419
419
420
420
420
420
420
...
As we can see, there are different milliseconds timing when looping start and when looping the end. I need more speed timing when called function 30 times.
At least, when we called function 30 times, i want that execute simultaneously in same milliseconds. Let say, when we start called function 30 times at milliseconds 418, then all called at milliseconds 418. No different timing.
I'm not talking about hundreds or thousands times called function in simulataneosly. I know, that's impossible. Just 30 or 20 or 10 times but in the perfect timing so it will be the real "simultaneously".
Is there any way?