netbymatt / ws4kp

WeatherStar 4000+
https://weatherstar.netbymatt.com
MIT License
236 stars 39 forks source link

Fix time flickering when frame is first displayed #27

Closed mike-mcgann closed 1 year ago

mike-mcgann commented 1 year ago

When a frame is first displayed sometimes there is a flickering effect with the current time. It either briefly shows an older time or an empty value before rendering the current time. This change fixes this by calling drawCurrentTime from within drawCanvas without having to wait for the first timer interval. The optimization to only render the time when the frame is active has been moved to the interval lambda.