testing promises with php
This commit is contained in:
6
promises/sleep.php
Normal file
6
promises/sleep.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
$s = ((int)$_GET['s']?: random_int(2, 5));// * 1000000;
|
||||
sleep($s);
|
||||
//printf("\$µs=%d", $s);
|
||||
printf("\$s=%d", $s);
|
Reference in New Issue
Block a user