Skip to content

Instantly share code, notes, and snippets.

@Kenshino
Created March 22, 2015 17:46
Show Gist options
  • Save Kenshino/55813c14910e519634ae to your computer and use it in GitHub Desktop.
Save Kenshino/55813c14910e519634ae to your computer and use it in GitHub Desktop.
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
$time_start = msec();
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
// Display Script End time
$time_end = msec();
$execution_time = $time_start - $time_end;
//execution time of the script
echo '<b>Total Execution Time:</b> ' . abs( $execution_time ) . 'ms';
function msec() {
list($usec, $sec) = explode( ' ',microtime() );
return intval( ( $usec + $sec ) * 1000.0 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment