It's actually the loop that was used in a game called RuneScape, but this is from their #317 revision client which is from 2006. It was originally obfuscated so all the names were like 'anInt4' 'anLong1'. So the variable names are most likely nowhere near the original.

If you read closely to what it's doing though, it makes somewhat sense. It's just a matter of figuring out what exactly they were trying to do. The original source probably had documentation on what was going on and an explanation.

Well, this code was also obfuscated quite a bit. It may be that it is intentionally cluttered to make its intention unclear. I know for a fact that the 317 client is not the most easily understandable piece of work ever written, and it could be for reasons other than insane british programmers.

I'm guessing some sort of smoothing is going on, like a 10 element moving average.

I think a delay is calculated, constrained by upper & lower limits mysteriously (to me), then 1/10th of that delay is added into each of 10 elements of operationTime. The amount of delay is aimed at giving a target rate of 50fps.

The main pointer into operationTime is operationPos, which rotates circularly through this array via an increment and mod 10, and is involved in calculating an amount of delay based on the current difference between the actual and the target times.

"We all secretly believe we are right about everything and, by extension, we are all wrong." W. Storr, The Unpersuadables

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org