Timed movement java game
<pre><code>    Calendar date1 = Calendar.getInstance();
    Calendar date2 = Calendar.getInstance();
    boolean checkTime = true;





        if (checkTime == true)
            before=date1.get(Calendar.SECOND);
        checkTime=false;

        after=date2.get(Calendar.SECOND);   

        difference= after-before;
</code></pre>

<p>I have it so that the before variable will become a static second, and it will keep recalculating the after time, and get the difference between the two. However it seems to only update the 'after' variable once, resulting in a difference of 0.</p>

<p>Ps. this is for a game that I'm playing with and I'm trying to make the movement relative to time.
I can't figure out what I'm doing wrong.</p>
