Returns a copy of this instant with the specified duration in nanoseconds subtracted.
package com.logicbig.example.instant;
import java.time.Instant;
public class MinusNanosExample3 {
public static void main(String... args) {
Instant i = Instant.now();
System.out.println(i);
Instant i2 = i.minusNanos(300000000);
System.out.println(i2);
}
}
Output
2017-05-01T20:57:38.879Z
2017-05-01T20:57:38.579Z