Changes
[iotcloud.git] / version2 / src / java / light_fan_embed_benchmark / LightsController.java
index a8b7be2398f9032c8399ee10f8f4131e357e8eba..19c1f72ced2c66b424ea82544e34aac58f11a8a0 100644 (file)
@@ -93,22 +93,21 @@ class LightsController {
 
             try {
 
-                counter++;
-                if (counter == 10) {
-                    counter = 0;
+                System.out.println("Loop");
 
-                    String pingTimer = Long.toString(System.currentTimeMillis());
-                    IoTString ipingTimer = new IoTString(pingTimer);
+                String pingTimer = Long.toString(System.currentTimeMillis());
+                IoTString ipingTimer = new IoTString(pingTimer);
 
-                    t1.update();
-                    t1.startTransaction();
-                    t1.addKV(ipingTimerKey, ipingTimer);
-                    t1.commitTransaction();
-                }
+                t1.update();
+                t1.startTransaction();
+                t1.addKV(ipingTimerKey, ipingTimer);
+                t1.commitTransaction();
 
 
-                t1.update();
-                Thread.sleep(1000);
+                
+
+                
+                
 
                 for (int i = 0; i < 3; i++) {
                     IoTString testValA1 = t1.getCommitted(keys.get(i));
@@ -119,8 +118,11 @@ class LightsController {
                     }
                 }
 
+                Thread.sleep(1000);
+
             } catch (Error e) {
 
+                e.printStackTrace();
                 for (int i = 0; i < 3; i++) {
                     bulbs.get(i).setColor(0, 100, 100);
                 }