www-tests/promises/sleep.php

7 lines
128 B
PHP
Raw Permalink Normal View History

2019-11-22 19:34:10 +00:00
<?php
$s = ((int)$_GET['s']?: random_int(2, 5));// * 1000000;
sleep($s);
//printf("\$µs=%d", $s);
printf("\$s=%d", $s);