All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cybergarage.util.TimerUtil Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
/******************************************************************
*
*	CyberUtil for Java
*
*	Copyright (C) Satoshi Konno 2002-2003
*
*	File: TimerUtil.java
*
*	Revision:
*
*	01/15/03
*		- first revision.
*
******************************************************************/

package org.cybergarage.util;

public final class TimerUtil
{
	public final static void wait(int waitTime)
	{
		try {
			Thread.sleep(waitTime);
		}
		catch (Exception e) {}
	}

	public final static void waitRandom(int time)
	{
		int waitTime = (int)(Math.random() * (double)time);		
		try {
			Thread.sleep(waitTime);
		}
		catch (Exception e) {}
	}
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy