X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=Methods%2Funschedule.groovy;h=22ff9228c2076f687474babaeded680bb2a68f25;hb=edbe95f550e8d70ffc92f9afaf79b80ed9243c53;hp=803360608758e2736fef11cf8bc4af6528af175f;hpb=fbcbbcd3abd6dafc027d5d23cab920301833c612;p=smartthings-infrastructure.git diff --git a/Methods/unschedule.groovy b/Methods/unschedule.groovy index 8033606..22ff922 100644 --- a/Methods/unschedule.groovy +++ b/Methods/unschedule.groovy @@ -1,9 +1,29 @@ ///////////////////////////////////////////////////////////////////// ////unschedule(func) -def unschedule(Closure Input) { - for (int i = 0;i < ListofTimersFunc.size();i++) { - if (ListofTimersFunc[i] == Input) { - ListofTimers[i].cancel() +def unschedule(Closure functionToUnschedule) { + /*for (int i = 0;i < timersFuncList.size();i++) { + if (timersFuncList[i] == functionToUnschedule) { + if (timersList != null) + timersList[i].cancel() } - } + }*/ +} + +def unschedule(String nameOfFunctionToUnschedule) { + /*for (int i = 0;i < timersFuncList.size();i++) { + if (timersFuncList[i] instanceof String) { + if (timersFuncList[i] == nameOfFunctionToUnschedule) { + if (timersList != null) + timersList[i].cancel() + } + } + }*/ +} + + +def unschedule() { + /*for (int i = 0;i < timersFuncList.size();i++) { + if (timersList != null) + timersList[i].cancel() + }*/ }