Java Minute Get getOffMinutes(long timestamp)

Here you can find the source of getOffMinutes(long timestamp)

Description

return the time difference from a specified time to now in minutes

License

Apache License

Parameter

Parameter Description
timestamp unix timestamp of a specified time

Return

long value

Declaration

public static long getOffMinutes(long timestamp) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/*from  w  ww . j av a  2  s . c  o m*/
     * return the time difference from a specified time to now in minutes
     *
     * @param timestamp unix timestamp of a specified time
     * @return long value
     */
    public static long getOffMinutes(long timestamp) {
        return getOffMinutes(timestamp, System.currentTimeMillis());
    }

    /**
     * return the time difference from two specified time
     *
     * @param left  unix timestamp of the first specified time
     * @param right unix timestamp of the second specified time
     * @return long value
     */
    public static long getOffMinutes(long left, long right) {
        return (left - right) / 60000L;
    }
}

Related

  1. getMinutesTime(long msTime)
  2. getNextMinute(Integer minute)
  3. getNumberOfMinutes(long milliseconds)
  4. getOffMinutes()
  5. getOffMinutes(long l)
  6. getRawMinutes(int m)
  7. getRemainingMinutes(final long ms)
  8. getRemainingMinutes(int minutes)
  9. getReminderMinutes(int option)