Here you can find the source of elapsed(long from, long required)
Parameter | Description |
---|---|
from | = certain moment |
required | = amount of required time |
public static boolean elapsed(long from, long required)
//package com.java2s; //License from project: Open Source License public class Main { /**//w w w. j a v a2 s .c o m * Check if enough time has passed by from a certain moment. * @param from = certain moment * @param required = amount of required time * @return true or false */ public static boolean elapsed(long from, long required) { return System.currentTimeMillis() - from > required; } }