[java] Current time in microseconds in java

a "quick and dirty" solution that I eventually went with:

TimeUnit.NANOSECONDS.toMicros(System.nanoTime());

UPDATE:

I originally went with System.nanoTime but then I found out it should only be used for elapsed time, I eventually changed my code to work with milliseconds or at some places use:

TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis());

but this will just add zeros at the end of the value (micros = millis * 1000)

Left this answer here as a "warning sign" in case someone else thinks of nanoTime :)