diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-04-23 12:10:19 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-04-23 12:10:19 +0200 |
commit | 6f3fd0fe5e86f50422ab9398a33f7351986634b0 (patch) | |
tree | b5bda67045ecedac94ef2f8a53c6537e772a761b /system/database/DB_driver.php | |
parent | b3f774bbbb81293326136e3e13297c3b8d49dfa4 (diff) | |
parent | ab3cab5a8f2afdd45ec8c6c365e43722781e54e6 (diff) |
Merge pull request #1271 from dixy/develop-microtime
Use parameter 'get_as_float' of microtime()
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 61b05d52b..cb04c7103 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -335,7 +335,7 @@ abstract class CI_DB_driver { } // Start the Query Timer - $time_start = list($sm, $ss) = explode(' ', microtime()); + $time_start = microtime(TRUE); // Run the Query if (FALSE === ($this->result_id = $this->simple_query($sql))) @@ -370,12 +370,12 @@ abstract class CI_DB_driver { } // Stop and aggregate the query time results - $time_end = list($em, $es) = explode(' ', microtime()); - $this->benchmark += ($em + $es) - ($sm + $ss); + $time_end = microtime(TRUE); + $this->benchmark += $time_end - $time_start; if ($this->save_queries == TRUE) { - $this->query_times[] = ($em + $es) - ($sm + $ss); + $this->query_times[] = $time_end - $time_start; } // Increment the query counter |