Infrastructure that works for all the locks' group!
[smartthings-infrastructure.git] / Methods / schedule.groovy
index 3981f5466b6bc0bf373f42dbc6194a740c63f9cc..fef90b4f3e04cc9ccaa2f647af07191438f48fa7 100644 (file)
@@ -41,10 +41,10 @@ def schedule(String time, Closure nameOfFunction) {
 
        if (timersFuncList.contains(nameOfFunction)) {
                timersList[timersFuncList.indexOf(nameOfFunction)].cancel()
-               def task = timersList[timersFuncList.indexOf(nameOfFunction)].runAfter(delay*seconds*0, nameOfFunction)
+               def task = timersList[timersFuncList.indexOf(nameOfFunction)].runAfter(delay*0, nameOfFunction)
        } else {
                timersFuncList.add(nameOfFunction)
                timersList.add(new SimulatedTimer())
-               def task = timersList[timersFuncList.indexOf(nameOfFunction)].runAfter(delay*seconds*0, nameOfFunction)
+               def task = timersList[timersFuncList.indexOf(nameOfFunction)].runAfter(delay*0, nameOfFunction)
        }
 }