Changeset 682 for trunk/Common/Global.php
- Timestamp:
- Aug 5, 2014, 10:49:06 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Global.php
r679 r682 433 433 return($PathItems); 434 434 } 435 436 function RepeatFunction($Period, $Function) 437 { 438 while(1) 439 { 440 $StartTime = time(); 441 $Function(); 442 $EndTime = time(); 443 $Delay = $Period - ($EndTime - $StartTime); 444 if($Delay < 0) $Delay = 0; 445 446 echo('Waiting '.$Delay.' seconds...'."\n"); 447 sleep($Delay); 448 } 449 }
Note:
See TracChangeset
for help on using the changeset viewer.