This repository has been archived on 2024-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
epubreader/lib/Utility/Time.php
Michel Roux 7da83b2595
All checks were successful
epubreader / nextcloud-22 (push) Successful in 1m4s
epubreader / nextcloud-27 (push) Successful in 56s
cleanup (again)
2023-08-02 22:04:03 +02:00

30 lines
515 B
PHP

<?php
/**
* @author Frank de Lange
* @copyright 2017 Frank de Lange
*
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
namespace OCA\Epubreader\Utility;
class Time
{
public function getTime(): int
{
return time();
}
/**
* @return int the current unix time in miliseconds
*/
public function getMicroTime(): int
{
list($millisecs, $secs) = explode(' ', microtime());
return (int) ($secs.substr($millisecs, 2, 6));
}
}