Skip to content

Commit

Permalink
add better execute time #48 #commitcomment-16943919
Browse files Browse the repository at this point in the history
  • Loading branch information
derpixler committed Apr 5, 2016
1 parent 78509b1 commit 492f472
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion inc/Database/Replace.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php
namespace Inpsyde\SearchReplace\Database;

use InvalidArgumentException;
use InvalidArgumentException,
Inpsyde\SearchReplace\Service;

/**
* Class Replace
Expand Down Expand Up @@ -72,6 +73,9 @@ public function __construct( Manager $dbm ) {

public function run_search_replace( $search, $replace, $tables ) {

$execution_time = new Service\MaxExecutionTime();
$execution_time->set();

$report = array(
'errors' => NULL,
'changes' => array(),
Expand All @@ -93,6 +97,8 @@ public function run_search_replace( $search, $replace, $tables ) {

}

$execution_time->restore();

return $report;
}

Expand Down

0 comments on commit 492f472

Please sign in to comment.