 <p>Don't use the Swing timer; that's a kluge from early Swing days.</p> <p>The ScheduledExecutorService is the more general and configurable of the two remaining contenders. It accepts nanosecond precision, but of course cannot provide any better than milisecond accuracy depending on platform. You'd need a real-time JVM for nanosecond accuracy.</p>