Example usage for java.time Instant plusNanos

List of usage examples for java.time Instant plusNanos

Introduction

In this page you can find the example usage for java.time Instant plusNanos.

Prototype

public Instant plusNanos(long nanosToAdd) 

Source Link

Document

Returns a copy of this instant with the specified duration in nanoseconds added.

Usage

From source file:Main.java

public static void main(String[] args) {
    Instant instant = Instant.parse("2014-12-03T10:15:30.00Z");
    instant = instant.plusNanos(10000);
    System.out.println(instant);//from   w  w w .  j  av  a2s  .co  m

}