chrisjohnson00 commented on a Page, duration()  -  Jun 27, 2012

I also wanted to note that the function fails if the process completes in less than 1 second, as @Dean O also pointed out. I've added:
if (is_null($duration))
$duration = array('less than 1 second');
before the return statement to handle this case.
IMO, this is a better alternative to what @Dean O suggests since it results in correct output under all use cases.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.