Created
April 15, 2012 16:43
-
-
Save rskull/2393779 to your computer and use it in GitHub Desktop.
ベンチマークてきな
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Benchmark { | |
public $time; | |
public function Start () { | |
$this->time = microtime(true); | |
} | |
public function Stop () { | |
$diff = microtime(true) - $this->time; | |
return $diff; | |
} | |
} | |
//テスト | |
$time = new Benchmark; | |
$time->Start(); | |
for ($i=0;$i<10000;$i++) {} | |
echo $time->Stop(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment