Here you can find the source of getOffMinutes(long timestamp)
Parameter | Description |
---|---|
timestamp | unix timestamp of a specified time |
public static long getOffMinutes(long timestamp)
//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; } }