public static function run($bootstrap) { ZFE_Util_Stopwatch::start('page'); self::$bootstrap = $bootstrap; $methods = get_class_methods(get_called_class()); foreach ($methods as $method) { if (strpos($method, "_init") === 0) { self::$method(); } } }
public function testTimings() { ZFE_Util_Stopwatch::start('timing'); usleep(200000); ZFE_Util_Stopwatch::stop('timing'); $timing = ZFE_Util_Stopwatch::get('timing'); $this->assertEquals($timing['duration'], 0.2, '', 0.001); ZFE_Util_Stopwatch::start('timing'); usleep(100000); ZFE_Util_Stopwatch::stop('timing'); $timing = ZFE_Util_Stopwatch::get('timing'); $this->assertEquals($timing['duration'], 0.1, '', 0.001); }