Back to project page memory-game-android.
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.
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; } }