java how to measure time code example
Example 1: java measure execution time
Instant start = Instant.now();
Thread.sleep(63553);
Instant end = Instant.now();
System.out.println(Duration.between(start, end)); // prints PT1M3.553S
Example 2: calculate time java
System.out.println(LocalTime.now());