java how to calculate time of a method code example Example: calculate time java System.out.println(LocalTime.now());