Android Open Source - memory-game-android Stop Watch






From Project

Back to project page memory-game-android.

License

The source code is released under:

MIT License

If you think the Android project memory-game-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package catalinc.games.memory_game;
/*from  w ww  .  j a v a  2  s  . c  o m*/
import java.io.Serializable;

public class StopWatch implements Serializable {

    private long elapsed;
    private long start;

    public void start() {
        elapsed = 0;
        start = System.currentTimeMillis();
    }

    public void pause() {
        elapsed += System.currentTimeMillis() - start;
    }

    public void resume() {
        start = System.currentTimeMillis();
    }

    public long elapsed() {
        return  System.currentTimeMillis() - start + elapsed;
    }
}




Java Source Code List

catalinc.games.memory_game.GameThread.java
catalinc.games.memory_game.GameView.java
catalinc.games.memory_game.Grid.java
catalinc.games.memory_game.MemoryGame.java
catalinc.games.memory_game.StopWatch.java
catalinc.games.memory_game.Tile.java