Skip to content

Commit 25e45a9

Browse files
committed
Run gmp_random tests more quickly
1 parent 7e049b0 commit 25e45a9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/gmp/tests/gmp_random_bits.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var_dump(gmp_random_bits(-1));
1313
gmp_random_bits(1);
1414
gmp_random_bits(1024);
1515

16-
// 2 seconds to make sure the numbers stay in range
16+
// 0.5 seconds to make sure the numbers stay in range
1717
$start = microtime(true);
1818
$limit = (2 ** 30) - 1;
1919
while (1) {
@@ -26,7 +26,7 @@ while (1) {
2626
}
2727
}
2828

29-
if (microtime(true) - $start > 2) {
29+
if (microtime(true) - $start > 0.5) {
3030
break;
3131
}
3232
}

ext/gmp/tests/gmp_random_range.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ gmp_random_range(-1, $plusTen);
3030
gmp_random_range($zero, $plusTen);
3131
gmp_random_range($minusTen, $plusTen);
3232

33-
// 2 seconds to make sure the numbers stay in range
33+
// 0.5 seconds to make sure the numbers stay in range
3434
$start = microtime(true);
3535
while (1) {
3636
for ($i = 0; $i < 5000; $i++) {
@@ -56,7 +56,7 @@ while (1) {
5656
}
5757
}
5858

59-
if (microtime(true) - $start > 2) {
59+
if (microtime(true) - $start > 0.5) {
6060
break;
6161
}
6262
}

0 commit comments

Comments
 (0)