lib/Util/TimeUnit.php
public static function convertInto(float $time, string $unit, string $destUnit)
    {
        if (!$time) {
            return 0;
        }

        self::validateUnit($unit);
        self::validateUnit($destUnit);

        $destMultiplier = self::$map[$destUnit];
        $sourceMultiplier = self::$map[$unit];

        $time = $destMultiplier / ($time * $sourceMultiplier);

        return $time;
    }
public static function convertInto(float $time, string $unit, string $destUnit)
    {
        if (!$time) {
            return 0;
        }

        self::validateUnit($unit);
        self::validateUnit($destUnit);

        $destMultiplier = self::$map[$destUnit];
        $sourceMultiplier = self::$map[$unit];

        $time = $destMultiplier / ($time * $sourceMultiplier);

        return $time;
    }
public static function convertInto ( float $ time , string $ unit , string $ destUnit ) { if ( ! $ time ) { return 0 ; } self :: validateUnit ( $ unit ) ; self :: validateUnit ( $ destUnit ) ; $ destMultiplier = self :: $ map [ $ destUnit ] ; $ sourceMultiplier = self :: $ map [ $ unit ] ; $ time = $ destMultiplier / ( $ time * $ sourceMultiplier ) ; return $ time ; }
Convert a given time INTO the given unit. That is, how many times the
given time will fit into the the destination unit. i.e. `x` per unit.
Convert a given time INTO the given unit . That is how many times the given time will fit into the the destination unit . i . e . x per unit .