public static void main(String[] args) throws InterruptedException {
Date currentTime = new Date();
Thread.sleep(1000);
Instant instant = currentTime.toInstant();
//毫秒
long haomiao = ChronoUnit.MILLIS.between(instant, Instant.now());
long fen = ChronoUnit.MINUTES.between(instant, Instant.now());
long miao = ChronoUnit.SECONDS.between(instant, Instant.now());
System.out.println(haomiao);
}