clean up threads and timers
[fanfix.git] / src / jexer / TTimer.java
index 0e711b967ec50ab6c1d4ac3fe612aa6573a3a7aa..442a55cc6ffbc7173ce8a29f58e7e5e7d7412e9f 100644 (file)
@@ -81,15 +81,6 @@ public final class TTimer {
         }
     }
 
-    /**
-     * Get the number of milliseconds between now and the next tick time.
-     *
-     * @return number of millis
-     */
-    public long getMillis() {
-        return nextTick.getTime() - (new Date()).getTime();
-    }
-
     /**
      * Package private constructor.
      *
@@ -103,7 +94,8 @@ public final class TTimer {
         this.duration  = duration;
         this.action    = action;
 
-        nextTick = new Date((new Date()).getTime() + duration);
+        Date now = new Date();
+        nextTick = new Date(now.getTime() + duration);
     }
 
 }