Java Instant Calculate secondsAgo(Instant end)

Here you can find the source of secondsAgo(Instant end)

Description

seconds Ago

License

Open Source License

Declaration

public static long secondsAgo(Instant end) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.time.*;

public class Main {
    public static long secondsAgo(Instant end) {
        return Duration.between(Instant.EPOCH, end).getSeconds();
    }/*w  w w .  ja  v  a 2 s.c om*/
}

Related

  1. nanos(Instant instant)
  2. plus(Instant instant, Duration add)
  3. plusMilli(Instant _date, long _milli)
  4. restrictToDaytime(Instant instantToRestrict, Instant thresholdTime, ZoneId userZoneId)
  5. roundUp(final Instant time, final Duration duration)