MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / getNextUpdateTime

Function getNextUpdateTime

Tactility/Source/lvgl/Statusbar.cpp:61–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59static void update_main(Statusbar* statusbar);
60
61static 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
71static void onUpdateTime() {
72 time_t now = ::time(nullptr);

Callers 1

onUpdateTimeFunction · 0.85

Calls 2

isLoggingDebugMethod · 0.80
debugMethod · 0.80

Tested by

no test coverage detected