Hi, On Wed, Feb 19, 2014 at 9:38 AM, Julian Reschke <[email protected]> wrote: > ...(I just checked and nanoTime is recommended only for calculating time > differences...)
Yes, quoting [1] "This method provides nanosecond precision, but not necessarily nanosecond resolution (that is, how frequently the value changes) - no guarantees are made except that the resolution is at least as good as that of currentTimeMillis()" - so nanoTime is not better than currentTimeMillis for generating unique values. -Bertrand [1] http://docs.oracle.com/javase/7/docs/api/java/lang/System.html#nanoTime()
