summaryrefslogtreecommitdiffstats
path: root/src/jake2/sys/StandardTimer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jake2/sys/StandardTimer.java')
-rw-r--r--src/jake2/sys/StandardTimer.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/jake2/sys/StandardTimer.java b/src/jake2/sys/StandardTimer.java
new file mode 100644
index 0000000..133bb24
--- /dev/null
+++ b/src/jake2/sys/StandardTimer.java
@@ -0,0 +1,27 @@
+/*
+ * StandardTimer.java
+ * Copyright (C) 2005
+ *
+ * $Id: StandardTimer.java,v 1.1 2005-07-01 14:11:00 hzi Exp $
+ */
+package jake2.sys;
+
+
+class StandardTimer extends Timer {
+
+ private long base;
+
+ StandardTimer() {
+ base = System.currentTimeMillis();
+ }
+
+ public long currentTimeMillis() {
+ long time = System.currentTimeMillis();
+ long delta = time - base;
+ if (delta < 0) {
+ delta += Long.MAX_VALUE + 1;
+ }
+ return delta;
+ }
+
+}