Example usage for java.time LocalTime minus

List of usage examples for java.time LocalTime minus

Introduction

In this page you can find the example usage for java.time LocalTime minus.

Prototype

@Override
public LocalTime minus(long amountToSubtract, TemporalUnit unit) 

Source Link

Document

Returns a copy of this time with the specified amount subtracted.

Usage

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();
    LocalTime s = l.minus(1000, ChronoUnit.SECONDS);
    System.out.println(s);/*www  . j  av a  2 s  . com*/
}