List of usage examples for java.time LocalTime toNanoOfDay
public long toNanoOfDay()
From source file:Main.java
public static void main(String[] args) { LocalTime l = LocalTime.now(); System.out.println(l.toNanoOfDay()); }
From source file:Main.java
public static void main(String[] args) { LocalTime time = LocalTime.of(15, 30, 23, 234); // 15:30:00 System.out.println(time.getHour()); // 15 System.out.println(time.getMinute()); // 30 System.out.println(time.getSecond()); // 23 System.out.println(time.getNano()); // 234 System.out.println(time.toSecondOfDay()); // 55823 System.out.println(time.toNanoOfDay()); // 55823000000234 }