Example usage for java.time OffsetTime until

List of usage examples for java.time OffsetTime until

Introduction

In this page you can find the example usage for java.time OffsetTime until.

Prototype

@Override
public long until(Temporal endExclusive, TemporalUnit unit) 

Source Link

Document

Calculates the amount of time until another time in terms of the specified unit.

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetTime m = OffsetTime.now();
    long n = m.until(OffsetTime.now(), ChronoUnit.MINUTES);
    System.out.println(n);//  ww w. j  a  v  a  2  s .  c  o m

}