public function convertTime(string $unit, float $value)
    {
        if ($unit === 'seconds') {
            return $value;
        }

        if ($unit === 'minutes') {
            return $value * (60);
        }

        if ($unit === 'hours') {
            return $value * (3600);
        }

        if ($unit === 'days') {
            return $value * (86400);
        }

        if ($unit === 'weeks') {
            return $value * (7 * 86400);
        }

        if ($unit === 'months') {
            return $value * (30 * 86400);
        }

        if ($unit === 'years') {
            return $value * (365 * 86400);
        }

        throw new \Exception('Wrong frequencies');
    }