diff options
author | Anatol Belski <ab@php.net> | 2018-01-11 12:40:01 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2018-01-11 12:40:01 +0100 |
commit | 45db77ed0d601e4be6252a1f742bc08f49408aad (patch) | |
tree | 53ea38703b37e156308aba065f3f7188647d5bdb /ext/standard/tests/hrtime | |
parent | 57e4be9cefa6edad4763dc26a01c74de922c8eba (diff) | |
download | php-git-45db77ed0d601e4be6252a1f742bc08f49408aad.tar.gz |
Revert "Add possibility to lower timer resolution"
This reverts commit c3717d9aecbe65cb2e5778a24a91e9eaf638639e.
The final mitigation of the consequences with spectre should be
discussed more also with the regard to the happenings on the
developments. Right now a preliminary mitigation might be wrong or
suboptimal, thus reverting this.
Diffstat (limited to 'ext/standard/tests/hrtime')
-rw-r--r-- | ext/standard/tests/hrtime/hrtime_ini.phpt | 15 | ||||
-rw-r--r-- | ext/standard/tests/hrtime/hrtime_resolution.phpt | 34 |
2 files changed, 0 insertions, 49 deletions
diff --git a/ext/standard/tests/hrtime/hrtime_ini.phpt b/ext/standard/tests/hrtime/hrtime_ini.phpt deleted file mode 100644 index 68149ab5f6..0000000000 --- a/ext/standard/tests/hrtime/hrtime_ini.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Ensure hrtime.resolution is not changeable from script ---INI-- -hrtime.resolution=1000000 ---FILE-- -<?php - var_dump( - ini_set("hrtime.resolution", 0), - ini_get("hrtime.resolution") - ); -?> ---EXPECT-- -bool(false) -string(7) "1000000" - diff --git a/ext/standard/tests/hrtime/hrtime_resolution.phpt b/ext/standard/tests/hrtime/hrtime_resolution.phpt deleted file mode 100644 index c546b03828..0000000000 --- a/ext/standard/tests/hrtime/hrtime_resolution.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test hrtime() reduced resolution ---INI-- -hrtime.resolution=20000 ---FILE-- -<?php - -/* This may fail on a very slow machine. Two subsequent timestamp - probes shoul lay in the configured interval. */ - -$d0 = hrtime(true) - hrtime(true); -$d0 = abs($d0); - -$t0 = hrtime(); -$t1 = hrtime(); -$d1 = ($t1[0] - $t0[0]) * 1000000000 + $t1[1] - $t0[1]; - -if (0 == $d0 || 20000 == $d0) { - echo "PASS hrtime(true)\n"; -} else { - echo "Two subsequent hrtime(true) calls gave $d0\n"; -} - -if (0 == $d1 || 20000 == $d1) { - echo "PASS hrtime()\n"; -} else { - echo "Two subsequent hrtime() calls gave $d1\n"; -} - -?> ---EXPECT-- -PASS hrtime(true) -PASS hrtime() - |