fork(1) download
  1. import java.time.Duration;
  2. import java.time.LocalTime;
  3.  
  4. class Main {
  5.  
  6. public static void main(String[] args) {
  7. LocalTime t0 = LocalTime.of(14, 0);
  8. LocalTime t1 = LocalTime.of(13, 0);
  9. Duration d = Duration.between(t0, t1);
  10. if (d.isNegative()) {
  11. d = d.plusDays(1);
  12. }
  13. System.out.println(d.toMillis());
  14. }
  15. }
Success #stdin #stdout 0.09s 47820KB
stdin
Standard input is empty
stdout
82800000