Skip to content

Instantly share code, notes, and snippets.

@dpritchett
Created October 13, 2016 16:37
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 dpritchett/346cfbb4ce1c1dc82ed4614db1a441ab to your computer and use it in GitHub Desktop.
Save dpritchett/346cfbb4ce1c1dc82ed4614db1a441ab to your computer and use it in GitHub Desktop.
  • In the context of the window, start a timer (setInterval) to do a thing every 1000 ms
  • that thing: tryToTickEachClockOnce():
    • find all clocks on the page
    • for each of those clocks, call decrementByOneSecondUnlessAlreadyZero(thisClockInParticular)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment