Last active
February 4, 2016 06:22
-
-
Save kurozumi/92e91c06fe8ad82088ba to your computer and use it in GitHub Desktop.
【PHP】シンプルなベンチマーククラスの使い方
This file contains 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 | |
$benchmark = new Benchmark(); | |
$benchmark->mark("start"); | |
sleep(5); | |
$benchmark->mark("stop"); | |
sleep(5); | |
$benchmark->mark("end"); | |
try { | |
echo $benchmark->getTime("start", "stop") . PHP_EOL; | |
echo $benchmark->getTime("start", "end") . PHP_EOL; | |
} catch (Exception $ex) { | |
echo $ex->getMessage(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment