https://docs.oracle.com/javase/6/docs/api/java/lang/System.html#currentTimeMillis() says:
Returns the current time in milliseconds. Note that while th
@Mark Rushakoff is right; nanoTime() might be slightly more reliable.
Addendum: note these caveats, cited by @Steven Schlansker.