Limiting iteration for now (DFSearch strategy would just go deep unceasingly); Comple...
[smartthings-infrastructure.git] / Timer / SimulatedTimer.groovy
index a13376610f5f56f26341e4a6cb4f666332c25a2c..cf123be7992dcebbbd6c72c398670ed20d608dbe 100644 (file)
@@ -10,7 +10,7 @@ public class SimulatedTimer {
 \r
        //By Apps\r
        def runAfter(int delay, Closure closure) {\r
-               thread = new Thread() {\r
+               /*thread = new Thread() {\r
        \r
                        @Override\r
                        public void run() {\r
@@ -18,11 +18,12 @@ public class SimulatedTimer {
                                closure()\r
                        }\r
                }.start()\r
-               return thread\r
+               return thread*/\r
+               closure()\r
        }\r
 \r
        def cancel() {\r
-               if (thread != null)\r
-                       thread.stop()\r
+               //if (thread != null)\r
+               //      thread.stop()\r
        }\r
 }\r