summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Utility/Time.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Utility/Time.php b/lib/Utility/Time.php
index 363583466..7565c53ab 100644
--- a/lib/Utility/Time.php
+++ b/lib/Utility/Time.php
@@ -20,11 +20,8 @@ class Time {
* @return int the current unix time in miliseconds
*/
public function getMicroTime() {
- $utimestamp = microtime(true);
- $timestamp = floor($utimestamp);
- $milliseconds = round(($utimestamp - $timestamp) * 1000000);
- $result = ($timestamp * 1000000) + $milliseconds;
- return intval($result);
+ list($millisecs, $secs) = explode(" ", microtime());
+ return $secs . substr($millisecs, 2);
}
-} \ No newline at end of file
+}