Example usage for java.time Duration from

List of usage examples for java.time Duration from

Introduction

In this page you can find the example usage for java.time Duration from.

Prototype

public static Duration from(TemporalAmount amount) 

Source Link

Document

Obtains an instance of Duration from a temporal amount.

Usage

From source file:Main.java

public static void main(String[] args) {
    Duration duration = Duration.from(Duration.ZERO);
    System.out.println(duration);
}