In the original DataStorm Timer API, schedule returned a "cancel" function. This supports cancellation while storing std::function. We could refactor IceInternal::Timer to use this old DataStorm API but it would be much more work. And it would be difficult to implement isScheduled. externl ap...
myTimerTaskPeriods.put(runnable,periodMilliseconds); if(myTimer!=null){ addTimerTaskInternal(runnable,periodMilliseconds); } } } 代码示例来源:origin: ydcx/KooReader publicfinalvoidaddTimerTask(Runnablerunnable,longperiodMilliseconds){ synchronized(myTimerLock){ removeTimerTask(runnable); myTimerTaskPeriods...