1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2025-05-08 13:34:06 +02:00
Nextcloud-News/lib/Utility/Time.php
2018-12-14 07:54:43 +01:00

30 lines
584 B
PHP

<?php
/**
* Nextcloud - News
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Bernhard Posselt <dev@bernhard-posselt.com>
* @copyright 2016 Bernhard Posselt
*/
namespace OCA\News\Utility;
class Time
{
public function getTime()
{
return time();
}
/**
* @return int the current unix time in miliseconds
*/
public function getMicroTime()
{
list($millisecs, $secs) = explode(" ", microtime());
return $secs . substr($millisecs, 2, 6);
}
}