meFraction * (nextData.value - previousData.value);
            }
          }
        }

        return interpolatedData;
      }

      function updateCountdown() {
        const now = new Date();
        if (!lastUpdated) {
          document.getElementById("countdown").textContent = "60s";
          refreshButton.disabled = true;
          return;
        }

        const timeSinceLastUpdate = now - lastUpdated;
        const timeUntilNextUpdate = Math.max(
          0,
          60000 - (timeSinceLastUp