org.cybergarage.util.TimerUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of upnp-stack Show documentation
Show all versions of upnp-stack Show documentation
A pure Java Open Source implementation of the UPnP stack for JDK 1.4 or above
The 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) {}
}
}