Java Time Since Format timeSince(long t)

Here you can find the source of timeSince(long t)

Description

Return the number of milliseconds that have elapsed between the specified time and now (as determined by System.currentTimeMillis).

License

MIT License

Parameter

Parameter Description
t A time before now

Return

The difference between System.currentTimeMillis() and t

Declaration

public static long timeSince(long t) 

Method Source Code

//package com.java2s;
/*/*from   w ww.  ja  v  a  2 s  . c om*/
 * Utils.java - Copyright(c) 2013 Joe Pasqua
 * Provided under the MIT License. See the LICENSE file for details.
 * Created: Jul 8, 2013
 */

public class Main {
    /**
     * Return the number of milliseconds that have elapsed between the specified
     * time and now (as determined by System.currentTimeMillis).
     * @param t A time before now
     * @return  The difference between System.currentTimeMillis() and t
     */
    public static long timeSince(long t) {
        return System.currentTimeMillis() - t;
    }
}

Related

  1. differenceNumberOfDays(long lodTime, long currentTime)
  2. timeSince()
  3. timeSince(long lastTimeInMillis)
  4. timeSince(long timestart)
  5. timeSinceNanos(long prevTime)
  6. timeSincePretty(long time)