lib/Util/TimeUnit.php
public static function convertTo(float $time, string $unit, string $destUnit)
    {
        self::validateUnit($unit);
        self::validateUnit($destUnit);

        $destM = self::$map[$destUnit];
        $sourceM = self::$map[$unit];

        $time = ($time * $sourceM) / $destM;

        return $time;
    }
public static function convertTo(float $time, string $unit, string $destUnit)
    {
        self::validateUnit($unit);
        self::validateUnit($destUnit);

        $destM = self::$map[$destUnit];
        $sourceM = self::$map[$unit];

        $time = ($time * $sourceM) / $destM;

        return $time;
    }
public static function convertTo ( float $ time , string $ unit , string $ destUnit ) { self :: validateUnit ( $ unit ) ; self :: validateUnit ( $ destUnit ) ; $ destM = self :: $ map [ $ destUnit ] ; $ sourceM = self :: $ map [ $ unit ] ; $ time = ( $ time * $ sourceM ) / $ destM ; return $ time ; }
Convert the given time from the given unit to the given destination
unit.
Convert the given time from the given unit to the given destination unit .