export function isTTLInFuture(item?: { TTL: number }) {
  if (!item) {
    return false;
  }

  // ttl is a UTC seconds time
  const ttl = item.TTL || 0;

  return parseInt("" + ttl) > getCurrentTimeInSeconds();
}

export function getCurrentTimeInSeconds(): number {
  return Date.now() / 1000;
}

export function getFutureTTLInSeconds(timeInFutureSeconds: number): number {
  return getCurrentTimeInSeconds() + timeInFutureSeconds;
}
