Java ChronoUnit get minutes between two LocalTime values
import java.time.LocalTime; import java.time.temporal.ChronoUnit; public class Main { public static void main(String[] args) { LocalTime lt1 = LocalTime.of(6, 0); LocalTime lt2 = LocalTime.of(9, 30); /*from w ww . java2 s . com*/ long minutes = ChronoUnit.MINUTES.between(lt1, lt2); System.out.println(minutes); } }