Skip to content

Commit

Permalink
Store execution time only if available
Browse files Browse the repository at this point in the history
  • Loading branch information
mveyrenc committed May 28, 2015
1 parent 869fcc0 commit 3e4ad0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion classes/owscriptlogger.php
Expand Up @@ -400,7 +400,9 @@ public function storeExtraInfo() {
$this->setAttribute( 'memory_usage', memory_get_usage() );
OWScriptLogger::$_timer->stopTimer( $this->attribute( 'identifier' ) );
$timeData = OWScriptLogger::$_timer->getTimeData();
$this->setAttribute( 'runtime', $timeData[0]->elapsedTime );
if($timeData && is_object($timeData[0])) {
$this->setAttribute( 'runtime', $timeData[0]->elapsedTime );
}
$this->store();
}
}
Expand Down

0 comments on commit 3e4ad0f

Please sign in to comment.