Frame independent movement apparently not working
<p>I've been developing a small android game and I'm attempting to get frame independent movement working. I've done it before in C++ with success but it doesn't appear to be working in my android application, any animations or movement seem to speed up and slow down at random intervals.
Here's the relevant code:</p>

<p><strong>Time since last frame calculation:</strong></p>

<pre><code>long start = SystemClock.uptimeMillis();    
...
entity.update(timeSinceLastFrame);
... 
timeSinceLastFrame = SystemClock.uptimeMillis() - start;
</code></pre>

<p><strong>Entity update:</strong></p>

<pre><code>...
x += speed * timeSinceLastFrame;
...
</code></pre>

<p>Where x represents the x coordinate of the entity.
I tried logging the time briefly and it didn't appear to fluctuate much (between about 10 and 25 milliseconds).</p>

<p>I have no idea what's wrong as I've actually written code similar to this before (where it's worked) and most of the answers on google seem to do something similar to this.</p>

<p>If it helps, I'm running this on a Samsung Galaxy S2, I tried it on the emulator too but I couldn't really tell if the same problem was occurring because it was too laggy.</p>
