Class.microtime.php

Clase que mide el tiempo que tardó en generarse una página web en PHP.
				<?php 

/******************************************************************************/
/* ============================================ */
/* Gbook MX v4.1.0 Copyright (c) 2003 by $Id class.microtime.php - v4.1.0 */
/* Víctor Simental - http://gbookmx.sourceforge.net */
/* ============================================ */
/* Based in the Module Gbook v1.0 for PHP Nuke Copyright (c) 2003 by */
/* http://www.PHP-Mania.com.ar */
/* Programed and Design By Víctor Simental and German Cúevas */
/* [email protected] */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/******************************************************************************/

/*
* @author Víctor Simental <[email protected]>, <[email protected]>
* @copyright Víctor Simental
* @Url http://phpdude.org
*/

class getmicrotime {
var $iniciar;

function micro(){
$micro_time = microtime();
$micro_time = explode(" ",$micro_time);
$micro_time = $micro_time[1] + $micro_time[0];
return $micro_time;
}

/*
* @Constructor of class - Initializes class
* @Usage -> include("class.microtime.php");
* $tiempo = new getmicrotime;
* echo $tiempo->vertiempo();
*/

function getmicrotime(){
$this->iniciar = $this->micro();
return true;
}

function vertiempo(){
$total_time = ($this->micro() - $this->iniciar);
$total_time = "Página generada en ".substr($total_time,0,5)." Segundos.";
return $total_time;
}
}

?>
Descargar adjuntos
COMPARTE ESTE TUTORIAL

COMPARTIR EN FACEBOOK
COMPARTIR EN TWITTER
COMPARTIR EN LINKEDIN
COMPARTIR EN WHATSAPP
TUTORIAL ANTERIOR

SIGUIENTE TUTORIAL