}
}
- /**
- * 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.
*
this.duration = duration;
this.action = action;
- nextTick = new Date((new Date()).getTime() + duration);
+ Date now = new Date();
+ nextTick = new Date(now.getTime() + duration);
}
}