Basically, that is a simple abstraction of what I want to achieve for real, but the problem is still here.
Everything is dummy data here but is a good representation of what the script should do.
It's not overwriting, that's an addition (+=), the total of both vars at the end represents a mean.
Because I simulate a sort of bandwidth shaping. Consider that the chunk of data is enough, on the clientside, to trigger a 1second time process (at least).
The rest would be queued in the client buffer anyway (w/o usleep), because it needs more or less one second to process the chunk of data (for some reason).
no it's not, it sums all results. the size is the same for each chunk.
you're right on that part, but I have no choice, and as PHP is a server side app, it would be able to calculate this, with more or less precision.
Sorry if I was not so clear.
Nunja