Skip to content

Commit

Permalink
Merge pull request #13 from lipedjow/patch-1
Browse files Browse the repository at this point in the history
Change getMicrotime() to microtime(true)
  • Loading branch information
renan committed Jun 14, 2011
2 parents d836b3a + 8e4d802 commit 6c6086a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions models/datasources/array_source.php
Expand Up @@ -87,7 +87,7 @@ public function read(&$model, $queryData = array()) {
);
return array($model->alias => array());
}
$startTime = getMicrotime();
$startTime = microtime(true);
$data = array();
$i = 0;
$limit = false;
Expand All @@ -113,7 +113,7 @@ public function read(&$model, $queryData = array()) {
}
}
if ($queryData['fields'] === 'COUNT') {
$this->_registerLog($model, $queryData, getMicrotime() - $startTime, 1);
$this->_registerLog($model, $queryData, microtime(true) - $startTime, 1);
if ($limit !== false) {
$data = array_slice($data, ($queryData['page'] - 1) * $queryData['limit'], $queryData['limit'], false);
}
Expand Down Expand Up @@ -160,7 +160,7 @@ public function read(&$model, $queryData = array()) {
}
}
}
$this->_registerLog($model, $queryData, getMicrotime() - $startTime, count($data));
$this->_registerLog($model, $queryData, microtime(true) - $startTime, count($data));
$_associations = $model->__associations;
if ($queryData['recursive'] > -1) {
foreach ($_associations as $type) {
Expand Down

0 comments on commit 6c6086a

Please sign in to comment.