cachetimer.java
来自「cwbbs 云网论坛源码」· Java 代码 · 共 52 行
JAVA
52 行
package cn.js.fan.cache.jcs;import cn.js.fan.kernel.Scheduler;public class CacheTimer extends Thread { private static long updateInterval; public static long currentTime; RMCache rmCache = RMCache.getInstance(); public static CacheTimer cTimer = null; public CacheTimer(long updateInterval) { this.updateInterval = updateInterval; this.setDaemon(true); this.setName("cn.js.fan.cache.jcs.CacheTimer"); start(); } public static synchronized void initInstance() { if (cTimer==null) cTimer = new CacheTimer(60000); } public void run() { while (true) { currentTime = System.currentTimeMillis(); rmCache.timer(); try { sleep(updateInterval); } catch (InterruptedException ie) { } } } public void refresh() { }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?