From 7c0de7459ee84d8fbea6514589613d22fb38574f Mon Sep 17 00:00:00 2001 From: amiraj Date: Thu, 1 Aug 2019 15:56:32 -0700 Subject: [PATCH] Fixing a minor bug in schedule method! --- Methods/schedule.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Methods/schedule.groovy b/Methods/schedule.groovy index 6089a06..fac8d95 100644 --- a/Methods/schedule.groovy +++ b/Methods/schedule.groovy @@ -16,8 +16,8 @@ def schedule(String time, String nameOfFunction) { // 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"() } @@ -26,7 +26,7 @@ def schedule(String time, String 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 -- 2.34.1