die; } // Description: Create Benchmark Class class c_Timer { var $t_start = 0; var $t_stop = 0; var $t_elapsed = 0; function start() { $this->t_start = microtime(); } function stop() { $this->t_stop = microtime(); } function elapsed() { $start_u = substr($this->t_start, 0, 10); $start_s = substr($this->t_start, 11, 10); $stop_u = substr($this->t_stop, 0, 10); $stop_s = substr($this->t_stop, 11, 10); $start_total = doubleval($start_u) + $start_s; $stop_total = doubleval($stop_u) + $stop_s; $this->t_elapsed = $stop_total - $start_total; return $this->t_elapsed; } } $BenchmarkTimer = new c_Timer(); $BenchmarkTimer->start(); // Start benchmarking immediately
$tmp = substr($chars, $num, 1); $pass = $pass . $tmp; $i++; } return $pass; } function PrintFlush($Text="") { print "$Text"; //flush(); } ### End defining functions. ### Start Timer $BenchmarkTimer = new c_Timer; $BenchmarkTimer->start(); ### Set timelimit and randomize timer. // set_time_limit(0); - This causes an error when running in safe_mode, and its a bad thing. srand((double)microtime()*1000000); ### Include config files and db scheme. include("includes/schema.php"); ### Update cookie. updatecookie(); $title="Create Universe";
# terms of the GNU General Public License as published by the Free Software Foundation; # # either version 2 of the License, or (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, but # # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License along with this # # program; if not, write to: # # # # Free Software Foundation, Inc., # # 59 Temple Place, Suite 330, # # Boston, MA 02111-1307 USA # ############################################################################################## include "includes/timer.class.php"; $BenchmarkTimer = new c_Timer(); $BenchmarkTimer->start(); // Start benchmarking immediately //$memusage =array(); # Include Configs & Variables ################################################################################################# require "library.php"; //$memusage =memory_checkpoint(__LINE__,__FILE__,$memusage); # The Head-Section ################################################################################################# include $HEADER; //$memusage =memory_checkpoint(__LINE__,__FILE__,$memusage); # The Menu-Section ################################################################################################# include "menu.php"; //$memusage =memory_checkpoint(__LINE__,__FILE__,$memusage);
$stop_u = substr($this->t_stop, 0, 10); $stop_s = substr($this->t_stop, 11, 10); $start_total = doubleval($start_u) + $start_s; $stop_total = doubleval($stop_u) + $stop_s; $this->t_elapsed = $stop_total - $start_total; return $this->t_elapsed; } } function PrintFlush($Text = "") { print "{$Text}"; flush(); } ### End defining functions. ### Start Timer $BenchmarkTimer = new c_Timer(); $BenchmarkTimer->start(); ### Set timelimit and randomize timer. set_time_limit(0); srand((double) microtime() * 1000000); ### Include config files and db scheme. include "includes/schema.php"; ### Update cookie. updatecookie(); $title = "New Game"; include "header.php"; ### Connect to the database. connectdb(); ### Print Title on Page. bigtitle(); ### Manually set step var if info isn't correct.