protected function calculate_skiptime(int $currentskip) : int {
        // If the feed has never failed, then the initial skiptime will be 0. We use a default of 5 minutes in this case.
        // If the feed has previously failed then we double that time.
        $newskiptime = max(MINSECS * 5, ($currentskip * 2));

        // Max out at the CLIENT_MAX_SKIPTIME.
        return min($newskiptime, self::CLIENT_MAX_SKIPTIME);
    }