Browse Source

remove sleeps

Jan Behrens 1 year ago
parent
commit
cdb76d389e
2 changed files with 11 additions and 11 deletions
  1. 3 3
      poll_adei_data.php
  2. 8 8
      poll_database.php

+ 3 - 3
poll_adei_data.php

@@ -111,7 +111,7 @@ $calltime = time();
         // increse loop counter
 	$counter ++;
 	$stoptime = time();
-	$wait_till = $starttime + 11;
+//	$wait_till = $starttime + 11;
 
 	if ($stoptime-$starttime > 10) {$errormessage .= "ERROR: delayed readout ".($stoptime-$starttime)." s "; $errorcount++;}
 	
@@ -143,8 +143,8 @@ $calltime = time();
         
 	//echo "Loop ".$counter." done.".PHP_EOL;
 
-        if ($wait_till <= $stoptime) sleep(3);
-        else time_sleep_until($wait_till);
+//        if ($wait_till <= $stoptime) sleep(3);
+//        else time_sleep_until($wait_till);
 
 //} while (($counter < 10) && (time() < $calltime + 51));
 

+ 8 - 8
poll_database.php

@@ -234,7 +234,7 @@
         // increse loop counter
         $counter++;
         $stoptime = time();
-        $wait_till = $starttime + 11;
+//        $wait_till = $starttime + 11;
 
         if ($stoptime - $starttime > 10) {
             $errormessage .= "ERROR: delayed readout " . ($stoptime - $starttime) . " s ";
@@ -298,13 +298,13 @@
             echo $errormessage;
         }
 
-        //echo "Loop ".$counter." done.".PHP_EOL;
-        if ($wait_till <= $stoptime) {
-            sleep(3);
-        }
-        else {
-            time_sleep_until($wait_till);
-        }
+//        //echo "Loop ".$counter." done.".PHP_EOL;
+//        if ($wait_till <= $stoptime) {
+//            sleep(3);
+//        }
+//        else {
+//            time_sleep_until($wait_till);
+//        }
 //    } while ($counter < 10 && time() < $calltime + 51);
 
     //echo "All loops done.".PHP_EOL;