X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=tests%2Ftime%2Fnanosleep001.phpt;fp=tests%2Ftime%2Fnanosleep001.phpt;h=f9e045104eacc166e085bf15e33d58addf7c52a8;hp=0000000000000000000000000000000000000000;hb=61918592ab618c073b9846783ce79fed9f26c5f7;hpb=7a717dad32d06fe5273ad3a9ce755908723f6685 diff --git a/tests/time/nanosleep001.phpt b/tests/time/nanosleep001.phpt new file mode 100644 index 0000000..f9e0451 --- /dev/null +++ b/tests/time/nanosleep001.phpt @@ -0,0 +1,44 @@ +--TEST-- +nanosleep +--SKIPIF-- + +--ENV-- +TZ=UTC +--INI-- +psi.directory = {PWD}/../../psi.d:{PWD} +--FILE-- +===TEST=== + 10000000], $rm), $rm); +var_dump(psi\gettimeofday($tv2), $tv2); +var_dump($tv2["tv_usec"]-$tv1["tv_usec"]); +?> +===DONE=== +--EXPECTF-- +===TEST=== +int(0) +array(2) { + ["tv_sec"]=> + int(1%d) + ["tv_usec"]=> + int(%d) +} +int(0) +array(2) { + ["tv_sec"]=> + int(0) + ["tv_nsec"]=> + int(0) +} +int(0) +array(2) { + ["tv_sec"]=> + int(%d) + ["tv_usec"]=> + int(%d) +} +int(%r\d\d\d\d\d%r) +===DONE===