projects
/
m6w6
/
ext-psi
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
history
|
raw
|
HEAD
PHP 8 compatibility
[m6w6/ext-psi]
/
tests
/
time
/
nanosleep001.phpt
1
--TEST--
2
nanosleep
3
--ENV--
4
TZ=UTC
5
--INI--
6
psi.directory = {PWD}/../../psi.d:{PWD}
7
--FILE--
8
===TEST===
9
<?php
10
var_dump(psi\gettimeofday($tv1), $tv1);
11
var_dump(psi\nanosleep(["tv_nsec" => 10000000], $rm), $rm);
12
var_dump(psi\gettimeofday($tv2), $tv2);
13
var_dump($tv2["tv_usec"]-$tv1["tv_usec"]);
14
?>
15
===DONE===
16
--EXPECTF--
17
===TEST===
18
int(0)
19
array(2) {
20
["tv_sec"]=>
21
int(1%d)
22
["tv_usec"]=>
23
int(%d)
24
}
25
int(0)
26
array(2) {
27
["tv_sec"]=>
28
int(0)
29
["tv_nsec"]=>
30
int(0)
31
}
32
int(0)
33
array(2) {
34
["tv_sec"]=>
35
int(%d)
36
["tv_usec"]=>
37
int(%d)
38
}
39
int(%r\d\d\d\d\d%r)
40
===DONE===