2
useVim
5y

what's the maximum setTimeout function you've ever used? and for what reason?

Comments
  • 0
    Do you mean the highest timeout?
  • 0
    Self invoking function that looped using setTimeout. Each 5 minutes it would do an ajax call or something. For some dumb reason I didn't use setInterval
  • 0
    I was never good at deciding the highest timeout. So I always do between 10sec and 1min but let me warn you, it's totally random.
  • 0
    Never set manually, but I had a Flash video chat app and it could flake out if you were connected for a while... People would have scheduled times to chat so if you got to the page early, it would use setTimeout to refresh the page when it was a few minutes before your time.
  • 0
    A friend of mine had that cookie clicker website open all the time and i set a timeout that would delete his cookies after day (but making a save before) or something. So yeah, probably 86400
  • 4
    I use setTimeout(actuallyWork, Infinity); quite often in my life
  • 0
    I once made a kind of scheduler (like cron) in JS. It would load stuff from a file, so probably something like 86400*30. Of course i wouldn't have that kind of uptime so it only executed the last time it was loaded, which was probably a few days before that.
  • 2
    60*60*1.5*1000... Automated test suite ran roughly 1.5 hours and i wanted to create an alert for when it finished. I was stupid back then.
Add Comment