Skip to content

Instantly share code, notes, and snippets.

@phybros
Created September 27, 2013 13:53
Show Gist options
  • Save phybros/6728940 to your computer and use it in GitHub Desktop.
Save phybros/6728940 to your computer and use it in GitHub Desktop.
Usage of the StopWatch class
<?php
// start the timer
StopWatch::start();
// sleep for 2 seconds
sleep(2);
// check how long 2 seconds is...
echo "Elapsed time: " . StopWatch::elapsed() . " seconds";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment