cz.mmsparams.api.utils.TimeoutHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of MmsParamsAPI Show documentation
Show all versions of MmsParamsAPI Show documentation
Common library for MmsParams system
The newest version!
package cz.mmsparams.api.utils;
import java.util.Date;
public class TimeoutHelper
{
private TimeoutHelper()
{
}
/**
* Check whether timeout occurred
*
* @param startDt start time for check timeout
* @param timeoutSec timeout in seconds
* @return true if timeout occurred
*/
public static synchronized boolean checkTimeOut(final Date startDt, final int timeoutSec)
{
// Returns the number of milliseconds
return timeoutSec * 1000 < (new Date().getTime() - startDt.getTime());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy