📄 threadutil.java
字号:
package de.spieleck.util;
/**
* Very simple helpers for delaying Threads.
* @author fsn
*/
public class ThreadUtil
{
/**
* A sleep, that does not throw an exeception and
* might sleep too short.
*/
public static void sleep(int ms)
{
try
{
Thread.sleep(ms);
}
catch ( InterruptedException ignore )
{
// We just proceed, that is the contract.
}
}
/**
* A sleep, that does not throw an exeception and
* might sleep too short.
*/
public static void sleep(int ms, int ns)
{
try
{
Thread.sleep(ms, ns);
}
catch ( InterruptedException ignore )
{
// We just proceed, that is the contract.
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -