aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php')
-rw-r--r--vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php b/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php
index 6442985fa..3a1e09cb4 100644
--- a/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php
+++ b/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php
@@ -1,4 +1,5 @@
<?php
+
/**
* This file is part of the ramsey/uuid library
*
@@ -7,27 +8,26 @@
*
* @copyright Copyright (c) Ben Ramsey <ben@benramsey.com>
* @license http://opensource.org/licenses/MIT MIT
- * @link https://benramsey.com/projects/ramsey-uuid/ Documentation
- * @link https://packagist.org/packages/ramsey/uuid Packagist
- * @link https://github.com/ramsey/uuid GitHub
*/
+declare(strict_types=1);
+
namespace Ramsey\Uuid\Provider\Time;
use Ramsey\Uuid\Provider\TimeProviderInterface;
+use Ramsey\Uuid\Type\Time;
+
+use function gettimeofday;
/**
- * SystemTimeProvider uses built-in PHP functions to provide the time
+ * SystemTimeProvider retrieves the current time using built-in PHP functions
*/
class SystemTimeProvider implements TimeProviderInterface
{
- /**
- * Returns a timestamp array
- *
- * @return int[] Array containing `sec` and `usec` components of a timestamp
- */
- public function currentTime()
+ public function getTime(): Time
{
- return gettimeofday();
+ $time = gettimeofday();
+
+ return new Time($time['sec'], $time['usec']);
}
}