1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2025-03-13 03:15:46 +01:00
This commit is contained in:
Bernhard Posselt 2016-08-18 22:04:02 +02:00
parent 31f0d12836
commit 70b8eb7bd4

View File

@ -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);
}
}
}