Is this guaranteed? It might be good to add a Thread.sleep(100) in the tasks just in case some people's computers run them too quickly, or their clock is low resolution. For example, on Windows, I think System.currentTimeMillis only advances every 10 or so milliseconds.