Skip to content

Fix a bug where the Clock was running hot

Compare
Choose a tag to compare
@chriscareycode chriscareycode released this 31 Jul 15:35

Not sure how this one happened but I'm glad I found it today. The Clock component was updating every 15/1000 seconds. Way too much. Update the timer to only run every 1s, and refactor it to directly write the Clock HTML to the DOM, bypassing React useState(). This should decrease CPU on the NagiosTV page significantly. Sorry for the wasted CPU cycles.