| 59 | static void update_main(Statusbar* statusbar); |
| 60 | |
| 61 | static TickType_t getNextUpdateTime() { |
| 62 | time_t now = ::time(nullptr); |
| 63 | tm* tm_struct = localtime(&now); |
| 64 | uint32_t seconds_to_wait = 60U - tm_struct->tm_sec; |
| 65 | if (LOGGER.isLoggingDebug()) { |
| 66 | LOGGER.debug("Update in {} s", seconds_to_wait); |
| 67 | } |
| 68 | return pdMS_TO_TICKS(seconds_to_wait * 1000U); |
| 69 | } |
| 70 | |
| 71 | static void onUpdateTime() { |
| 72 | time_t now = ::time(nullptr); |
no test coverage detected