Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/smartthings-infrastructure
[smartthings-infrastructure.git] / Methods / unschedule.groovy
1 /////////////////////////////////////////////////////////////////////
2 ////unschedule(func)
3 def unschedule(Closure functionToUnschedule) {
4         for (int i = 0;i < timersFuncList.size();i++) {
5                 if (timersFuncList[i] == functionToUnschedule) {
6                         if (timersList != null)
7                                 timersList[i].cancel()
8                 }
9         }
10 }
11
12
13 def unschedule() {
14         for (int i = 0;i < timersFuncList.size();i++) {
15                 if (timersList != null)
16                         timersList[i].cancel()
17         }
18 }