Previously, timekeeper used to create a timeout function that would wait specifically until the hour ticks over to register the hourly change, and therefore change the music. This process is flawed in several ways:
SetTimeout can become desynced in a way and slowly become wrong. If you were to have a SetTimeout function wait exactly 24 hours for example, you may wait slightly more or slightly less than exactly 24 hours.
Doing specific tasks, such as putting the computer to sleep, will pause the SetTimeout. When the computer wakes up, the SetTimeout will resume, but will be desynced from the current time (e.g. put the computer to sleep at 2:43pm, wake it up a few hours later, and it will continue to play the 2pm loop for another 17 minutes).
Some specific tasks can also completely break the SetTimeout causing it to never actually run. I'm not sure of any specifics of this, but I am aware of this being able to happen, causing the music to get permanently stuck.
I have updated the function to a SetInterval loop that runs every second, fixing all of the above issues, by running every second, and not waiting until a specific time, which will prevent it from getting desynced.
Previously, timekeeper used to create a timeout function that would wait specifically until the hour ticks over to register the hourly change, and therefore change the music. This process is flawed in several ways:
I have updated the function to a SetInterval loop that runs every second, fixing all of the above issues, by running every second, and not waiting until a specific time, which will prevent it from getting desynced.