Sha256: 5da339027b3163db04ff65a01a89dc890c7f00ffc07cac1581a23356cb60c133

Contents?: true

Size: 642 Bytes

Versions: 4

Compression:

Stored size: 642 Bytes

Contents

<?php

namespace Symfony\Polyfill\Php73;

/**
 * @author Gabriel Caruso <carusogabriel34@gmail.com>
 * @author Ion Bazan <ion.bazan@gmail.com>
 *
 * @internal
 */
final class Php73
{
    public static $startAt = 1533462603;

    /**
     * @param bool $asNum
     *
     * @return array|float|int
     */
    public static function hrtime($asNum = false)
    {
        $ns = \microtime(false);
        $s = \substr($ns, 11) - self::$startAt;
        $ns = 1E9 * (float) $ns;

        if ($asNum) {
            $ns += $s * 1E9;

            return \PHP_INT_SIZE === 4 ? $ns : (int) $ns;
        }

        return array($s, (int) $ns);
    }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dependabot-composer-0.112.1 helpers/vendor/symfony/polyfill-php73/Php73.php
dependabot-composer-0.111.57 helpers/vendor/symfony/polyfill-php73/Php73.php
dependabot-composer-0.111.56 helpers/vendor/symfony/polyfill-php73/Php73.php
dependabot-composer-0.111.52 helpers/vendor/symfony/polyfill-php73/Php73.php