Skip to content

Instantly share code, notes, and snippets.

@Cyken-Zeraux
Created December 27, 2014 23:06
Show Gist options
  • Save Cyken-Zeraux/1abef3b764caad10ed93 to your computer and use it in GitHub Desktop.
Save Cyken-Zeraux/1abef3b764caad10ed93 to your computer and use it in GitHub Desktop.
function supamicrotime() {
list($usec, $sec) = explode(' ', microtime());
return (float)$usec;
}
for ($y=0; $y<100; $y++) {
$beforex = supamicrotime();
for ($z=0; $z<10; $z++) {
test_function();
}
$afterx = supamicrotime();
echo bcdiv(bcsub($afterx, $beforex, 9), $z, 9);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment