Loading...
Searching...
No Matches
time_store.h
Go to the documentation of this file.
1
9#pragma once
10#include <pebble.h>
11
16
26typedef struct
27{
28 bool live;
30 bool beats;
31 bool hourly;
33
40void time_store_init(TimeConfig cfg, const struct tm *seed);
41
48
50void time_store_subscribe(void (*cb)(void));
51
53const struct tm *time_store_tm(void);
54
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.
Definition time_store.c:119
void time_store_subscribe(void(*cb)(void))
Hand it the function to call when the time changes (the screen redraw).
Definition time_store.c:114
void time_store_reconfigure(TimeConfig cfg)
Re-apply the rules (e.g. the time format changed). Swaps the ticker to match.
Definition time_store.c:143
const struct tm * time_store_tm(void)
The time we hold right now.
Definition time_store.c:159
The rules a face hands the store, built from its own settings so the store names no SETTING_*.
Definition time_store.h:27
bool minute_tick
Run the minute tick (clock date and most readouts).
Definition time_store.h:29
bool beats
Also run the 86.4 second .beats timer for a live .beats readout.
Definition time_store.h:30
bool hourly
With the minute tick off, still wake at the top of each hour, such as for an hourly buzz.
Definition time_store.h:31
bool live
True runs the tickers and false freezes the clock for screenshots.
Definition time_store.h:28