Since Java 8 you can call java.time.Instant.toEpochMilli().
For example the call
final long currentTimeJava8 = Instant.now().toEpochMilli(); gives you the same results as
final long currentTimeJava1 = System.currentTimeMillis(); Since Java 8 you can call java.time.Instant.toEpochMilli().
For example the call
final long currentTimeJava8 = Instant.now().toEpochMilli(); gives you the same results as
final long currentTimeJava1 = System.currentTimeMillis();