summaryrefslogtreecommitdiff
path: root/tools/Timer.java
diff options
context:
space:
mode:
Diffstat (limited to 'tools/Timer.java')
-rw-r--r--tools/Timer.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/Timer.java b/tools/Timer.java
new file mode 100644
index 0000000..08d8829
--- /dev/null
+++ b/tools/Timer.java
@@ -0,0 +1,23 @@
+package mahjong.tools;
+
+/**
+ * Created by joe on 12/2/14.
+ */
+public class Timer {
+ long st,ed;
+
+ public void tick()
+ {
+ st=System.currentTimeMillis();
+ }
+
+ public void tock()
+ {
+ ed=System.currentTimeMillis();
+ }
+
+ public long elapse()
+ {
+ return ed-st;
+ }
+}