--TEST--
time_sleep_until() function - basic test for time_sleep_until()
+--SKIPIF--
+<?php
+ function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.');
+?>
--CREDITS--
Manuel Baldassarri mb@ideato.it
Michele Orselli mo@ideato.it
time_sleep_until( $time );
var_dump( time() >= $time );
?>
+===DONE===
--EXPECT--
bool(true)
+===DONE===
--TEST--
time_sleep_until() function - error test for time_sleep_until()
+--SKIPIF--
+<?php
+ function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.');
+?>
--CREDITS--
Fabio Fabbrucci fabbrucci@grupporetina.com
Danilo Sanchi sanchi@grupporetina.com
<?php
var_dump(time_sleep_until(time()-1));
?>
+===DONE===
--EXPECTF--
Warning: time_sleep_until(): Sleep until to time is less than current time in %s on line 2
bool(false)
+===DONE===
--TEST--
time_sleep_until() function - error test for time_sleep_until()
+--SKIPIF--
+<?php
+ function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.');
+?>
--CREDITS--
Francesco Fullone ff@ideato.it
#PHPTestFest Cesena Italia on 2009-06-20
<?php
var_dump(time_sleep_until());
?>
+===DONE===
--EXPECTF--
Warning: time_sleep_until() expects exactly 1 parameter, 0 given in %s on line 2
NULL
+===DONE===
--TEST--
-time_sleep_until — Make the script sleep until the specified time
+time_sleep_until() : Make the script sleep until the specified time
+--SKIPIF--
+<?php
+ function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.');
+?>
--CREDITS--
Àlex Corretgé - alex@corretge.cat
--FILE--
$timeA = time();
time_sleep_until($timeA+3);
$timeB = time();
-echo ($timeB - $timeA) . " seconds.";
+echo ($timeB - $timeA) . " seconds.\n";
?>
+===DONE===
--EXPECT--
-3 seconds.
\ No newline at end of file
+3 seconds.
+===DONE===
+
\ No newline at end of file
--TEST--
-time_sleep_until — Make the script sleep until the specified time
+time_sleep_until() : Make the script sleep until the specified time
+--SKIPIF--
+<?php
+ function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.');
+?>
--CREDITS--
Àlex Corretgé - alex@corretge.cat
--FILE--
$timeA = time();
time_sleep_until($timeA-3);
$timeB = time();
-echo ($timeB - $timeA) . " seconds.";
+echo ($timeB - $timeA) . " seconds.\n";
?>
+===DONE===
--EXPECTF--
Warning: time_sleep_until(): Sleep until to time is less than current time in %s.php on line %d
-0 seconds.
\ No newline at end of file
+0 seconds.
+===DONE===
\ No newline at end of file