view client/src/lib/session.js @ 206:cd6ad5eaef8d

Renamed cmd/tokenserver to cmd/gemma.
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 22 Jul 2018 10:40:17 +0200
parents 4bf2173748f3
children 27502291e564
line wrap: on
line source

function sessionStillActive(expiresFromPastSession) {
  if (!expiresFromPastSession) return false;
  const now = Date.now();
  const stillActive = now < expiresFromPastSession;
  return stillActive;
}

function toMillisFromString(timestring) {
  return timestring * 1000;
}

export { sessionStillActive, toMillisFromString };