You are reading a single comment by @Tx and its replies. Click here to read the full conversation.
  • Why do you set chimeTimer to undefined in the callback function? Wouldnt that make it so that your clearTimeout is never called? if (chimeTimer) can't be true if chimeTimer is undefined. So seems like you are just getting an infinite recursion

  • To be exact: The shown code is derived from the Anton clock approach to time updates.

    Jep, you're right. Thank you. That's not correct. The undefined would lead to one buzz in the first, two buzzes in the second hour and so on. But this does not explain why this leads to infinite buzzes in the first hour - due to the 2s delay.

About

Avatar for Tx @Tx started