Timer not working inside class that extends SurfaceView and implements Runnable
<p>I'm doing a game and I have this class that I call GameLoop that extends SurfaceView and implements Runnable. I want to call methods inside the games sprite objects and change some their values in intervals. Therefore I came up with the idea to have a Timer object inside the constructor of the GameLoop class and call the methods via a manager for all the game sprite objects. I have done this before, and then it workt, but when I do it now the game force to close! What could be wrong and is their a better way to do this? </p>

<p>This is the code for the time interval I have in the constructor of the GameLoop class. When I remove the code, it works fine, but I dont get any interval!? Help is preciated! Thanks!</p>

<pre><code>        // Set timer to call method to change directions of Circle object in interval
    timer1.scheduleAtFixedRate(new TimerTask()
    {
        public void run() {
            // Call method to change direction
        }

    }, 0, 1000); // 1 sec
</code></pre>
