X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartthings-infrastructure.git;a=blobdiff_plain;f=Methods%2Funschedule.groovy;h=22ff9228c2076f687474babaeded680bb2a68f25;hp=322d80583d785a5631c6b7245495d05f67f56c2e;hb=c1971948245fda1774c4c76451387ae8c0b7ebc0;hpb=d6c9bed26d6482e0565de85fda57281899546ebb diff --git a/Methods/unschedule.groovy b/Methods/unschedule.groovy index 322d805..22ff922 100644 --- a/Methods/unschedule.groovy +++ b/Methods/unschedule.groovy @@ -1,18 +1,29 @@ ///////////////////////////////////////////////////////////////////// ////unschedule(func) def unschedule(Closure functionToUnschedule) { - for (int i = 0;i < timersFuncList.size();i++) { + /*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++) { + /*for (int i = 0;i < timersFuncList.size();i++) { if (timersList != null) timersList[i].cancel() - } + }*/ }