⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dimtimer.java

📁 这是一个分布式通信程序框架源程序
💻 JAVA
字号:
package dim;

public class DimTimer implements DimTimerHandler
{

	long id;
	public DimTimer(int secs)
	{
		start(secs);
	}
	public DimTimer()
	{
	}

	public static native long start(DimTimer theTimer, int secs);
	public static native int stop(long id);
	
	public void start(int secs)
	{
		id = start(this, secs);
	}
	
	public int stop()
	{
		return stop(id);
	}
	
	public static void sleep(int secs)
	{
  		try
        {
			Thread/*.currentThread()*/.sleep(secs*1000);
        }
        catch (Exception e) {}
	}
	public void timerHandler() {};
}

interface DimTimerHandler
{
	void timerHandler();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -