def unschedule(Closure functionToUnschedule) {
for (int i = 0;i < timersFuncList.size();i++) {
if (timersFuncList[i] == functionToUnschedule) {
- timersList[i].cancel()
+ if (timersList != null)
+ timersList[i].cancel()
}
}
}
+
+
+def unschedule() {
+ for (int i = 0;i < timersFuncList.size();i++) {
+ if (timersList != null)
+ timersList[i].cancel()
+ }
+}