Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Commit

Permalink
rounded down larger response times to 2dp
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Parkinson committed Jan 29, 2011
1 parent 9dfea56 commit 8b1409d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions.php
Expand Up @@ -93,7 +93,7 @@ function get_response($domain, $port) {
*/
function gen_html($id, $domain, $port, $time, $code) {
$units = gen_units($time);
if ($time < 1) { $time = $time * 1000; }
if ($time < 1) { $time = $time * 1000; } else { $time = round($time, 2); }
if ($id == 1) {
$html = "<p><a href=\"http://" . gen_domain($domain, $port) . "\" class=\"domain\" title=\"Visit " . $domain . "\">" . $domain . "</a> is working :)</p>\n\n";
$html .= "\t<p class=\"smaller\">It took " . $time . " " . $units . " for a <a href=\"http://en.wikipedia.org/wiki/List_of_HTTP_status_codes\" title=\"Wikipedia - HTTP Status Codes\">" . $code . "</a> response" . show_ip($domain) . ".</p>\n\n";
Expand Down

0 comments on commit 8b1409d

Please sign in to comment.