function get75PercentTimeInSeconds(issuedAt) {
  const twoHoursInSeconds = 2 * 60 * 60
  const seventyFivePercent = twoHoursInSeconds * 0.75
  const currentTimeInSeconds = Math.floor(Date.now() / 1000)
  const issuedAtInSeconds = Math.floor(issuedAt / 1000)

  const elapsedTimeInSeconds = currentTimeInSeconds - issuedAtInSeconds
  const remainingTimeInSeconds = seventyFivePercent - elapsedTimeInSeconds

  if (remainingTimeInSeconds <= 0) {
    return 0
  }

  return Math.round(remainingTimeInSeconds)
}

module.exports = get75PercentTimeInSeconds