Skip to content

Instantly share code, notes, and snippets.

@lucasinocente
Created December 29, 2020 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucasinocente/b3f0e34ab0be4acd850df6f4abfff80e to your computer and use it in GitHub Desktop.
Save lucasinocente/b3f0e34ab0be4acd850df6f4abfff80e to your computer and use it in GitHub Desktop.
const minutes = 20
const now = Date.now()
const minutesInMiliseconds = minutes * 60000
const timerSize = minutesInMiliseconds / 2000
console.log(now)
console.log(minutesInMiliseconds)
console.log(timerSize)
const moveTimer = leftPosicion => {
console.log('leftPosicion', leftPosicion)
setTimeout(() => {
moveTimer(leftPosicion - 1)
}, 1000)
}
moveTimer(timerSize)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment