time_start = microtime( $this->microtime_as_float ); } /** * Stops the timer. * * @since 1.0.72 */ public function stop_timer() { $this->time_stop = microtime( $this->microtime_as_float ); } /** * Return rounded elapsed time. * * @param int $precision Optional. How much to round float value. Default 2. * * @return float */ public function execution_time( $precision = 2 ) { $time = $this->elapsed_time(); return round( $time, $precision ); } /** * Return elapsed time. * * @return float */ public function elapsed_time() { return ( $this->time_stop - $this->time_start ); } }