//} else {
// delay = inputTime-currentTime
//}
-
- //timersFuncList.add(nameOfFunction)
- //timersList.add(new SimulatedTimer())
+ timersFuncList.add(nameOfFunction)
+ timersList.add(new SimulatedTimer())
def task = timersList[timersFuncList.indexOf(nameOfFunction)].runAfter(/*delay*1000*0*/0) {
"$nameOfFunction"()
}
def schedule(String time, Closure nameOfFunction) {
//def _inputTime = time.split(':')
//Date date = new Date()
- def _currentTime = date.format("HH:mm:ss").split(':')
+ //def _currentTime = date.format("HH:mm:ss").split(':')
//Convert input time and current time to minutes
//def inputTime = Integer.parseInt(_inputTime[0])*3600+Integer.parseInt(_inputTime[1])*60