Advertisement
kakatoji

output delay

Jun 17th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. <?php
  2. // viloid
  3. // Output Delay : 0s | 100% #############################################
  4. function timer(){
  5. $t = 45; // detik
  6. for ($i=1;$i<=$t;$i++){
  7. $pers = intval($i/$t*100);
  8. echo "\rDelay : ".($t-$i)."s | ".$pers."% ".str_repeat('#', $i);
  9. flush();
  10. sleep(1);
  11. }
  12. }
  13. timer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement