List of utility methods to do Time Since Format
int | differenceNumberOfDays(long lodTime, long currentTime) difference Number Of Days long cTime = currentTime - lodTime; Long dTime = cTime / ONE_DAY_MS; int eTime = dTime.intValue(); return eTime; |
long | timeSince() time Since return (System.currentTimeMillis() - time) / 1000;
|
String | timeSince(long lastTimeInMillis) time Since if (lastTimeInMillis == 0) { return "Never"; long timeDiff = System.currentTimeMillis() - lastTimeInMillis; String ret = ""; String sep = ""; if (timeDiff < SECOND_LENGTH) { ret = "Less than 1 second"; ... |
long | timeSince(long t) Return the number of milliseconds that have elapsed between the specified time and now (as determined by System.currentTimeMillis). return System.currentTimeMillis() - t;
|
long | timeSince(long timestart) Time elapsed since a start time. return (System.nanoTime() - timestart);
|
long | timeSinceNanos(long prevTime) Get the time in nanos passed since a previous time return nanoTime() - prevTime;
|
String | timeSincePretty(long time) time Since Pretty return "in " + prettyTime(time, true); |