Example usage for java.time OffsetDateTime plusNanos

List of usage examples for java.time OffsetDateTime plusNanos

Introduction

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

Prototype

public OffsetDateTime plusNanos(long nanos) 

Source Link

Document

Returns a copy of this OffsetDateTime with the specified number of nanoseconds added.

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetDateTime o = OffsetDateTime.now();
    OffsetDateTime d = o.plusNanos(20);
    System.out.println(d);// www  .jav  a 2 s.c o m
}