. //============================================================================ /** * @copyright Francois Laupretre * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, V 2.0 * @category phool * @package phool */ //============================================================================ namespace Phool\Debug; class Counter { //--------- public static $nb=0; public static $time=0.0; private static $t; public static function start() { self::$t=microtime(true); } public static function end() { self::$time+=(microtime(true)-self::$t); self::$nb++; } public static function display() { echo '>>> Count: '.self::$nb.' ; Time: '.self::$time."\n"; } //---------- } // End of class //============================================================================= ?>