Skip to content

Instantly share code, notes, and snippets.

@jtarleton
Created January 2, 2013 16:36
Show Gist options
  • Save jtarleton/4435909 to your computer and use it in GitHub Desktop.
Save jtarleton/4435909 to your computer and use it in GitHub Desktop.
Timer
<?php
//see helper sec2hms https://gist.github.com/4435891
$start = (float) array_sum(explode(' ', microtime()));
$end = (float) array_sum(explode(' ', microtime()));
$out = sprintf('Execution time: %s %s %s', sec2hms($end - $start), PHP_EOL, PHP_EOL);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment