The active time store: holds the current time and owns the tickers that update it.
More...
|
| static void | tick_handler (struct tm *tick_time, TimeUnits units_changed) |
| | Minute or hour tick handler: feed the tick straight in.
|
| static void | set (const struct tm *t) |
| | Save the new time and tell whoever is listening.
|
| static void | beats_fire (void *data) |
| | .beats ticker: refresh the time and re-arm for the next beat boundary.
|
|
static void | start_ticker (void) |
| | Run the tickers the config asks for. The minute tick and the .beats timer are independent, so a face can have either or both (a clock and .beats can run together). With the minute tick off, hourly subscribes the hour tick instead.
|
|
static void | stop_ticker (void) |
| | Stop both tickers (seed mode / teardown).
|
|
void | time_store_subscribe (void(*cb)(void)) |
| | Hand it the function to call when the time changes (the screen redraw).
|
| void | time_store_init (TimeConfig cfg, const struct tm *seed) |
| | Start the store with its rules. Pass seed = NULL to start from the current time.
|
| void | time_store_reconfigure (TimeConfig cfg) |
| | Re-apply the rules (e.g. the time format changed). Swaps the ticker to match.
|
|
const struct tm * | time_store_tm (void) |
| | The time we hold right now.
|
The active time store: holds the current time and owns the tickers that update it.