diff options
author | Nikita Popov <nikic@php.net> | 2015-04-16 16:29:57 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-04-16 16:29:57 +0200 |
commit | 25e45a935036d1bc69ed5dda323c09ab1f160d6e (patch) | |
tree | 00b6ccc795a17b0a06618ae7ab0f38ea7d2c8323 /ext/gmp | |
parent | 7e049b04270b3f46970dcf68b8b2bf12e0c6babd (diff) | |
download | php-git-25e45a935036d1bc69ed5dda323c09ab1f160d6e.tar.gz |
Run gmp_random tests more quickly
Diffstat (limited to 'ext/gmp')
-rw-r--r-- | ext/gmp/tests/gmp_random_bits.phpt | 4 | ||||
-rw-r--r-- | ext/gmp/tests/gmp_random_range.phpt | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/gmp/tests/gmp_random_bits.phpt b/ext/gmp/tests/gmp_random_bits.phpt index 21d493cdb6..b4aa5d7b73 100644 --- a/ext/gmp/tests/gmp_random_bits.phpt +++ b/ext/gmp/tests/gmp_random_bits.phpt @@ -13,7 +13,7 @@ var_dump(gmp_random_bits(-1)); gmp_random_bits(1); gmp_random_bits(1024); -// 2 seconds to make sure the numbers stay in range +// 0.5 seconds to make sure the numbers stay in range $start = microtime(true); $limit = (2 ** 30) - 1; while (1) { @@ -26,7 +26,7 @@ while (1) { } } - if (microtime(true) - $start > 2) { + if (microtime(true) - $start > 0.5) { break; } } diff --git a/ext/gmp/tests/gmp_random_range.phpt b/ext/gmp/tests/gmp_random_range.phpt index a8e7c4a9c1..db2ece61c5 100644 --- a/ext/gmp/tests/gmp_random_range.phpt +++ b/ext/gmp/tests/gmp_random_range.phpt @@ -30,7 +30,7 @@ gmp_random_range(-1, $plusTen); gmp_random_range($zero, $plusTen); gmp_random_range($minusTen, $plusTen); -// 2 seconds to make sure the numbers stay in range +// 0.5 seconds to make sure the numbers stay in range $start = microtime(true); while (1) { for ($i = 0; $i < 5000; $i++) { @@ -56,7 +56,7 @@ while (1) { } } - if (microtime(true) - $start > 2) { + if (microtime(true) - $start > 0.5) { break; } } |