Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void handle_minute_tick(AppContextRef ctx, PebbleTickEvent *t)
- {
- /* Need to be static because pointers to them are stored in the text
- * layers.
- */
- static char day_text[] = "XXX";
- static char month_text[] = "XXX";
- static char daynum_text[] = "00";
- static char hour_text[] = "00";
- static char minute_text[] = "00";
- (void)ctx; /* prevent "unused parameter" warning */
- if (t->units_changed & DAY_UNIT)
- {
- string_format_time(day_text,
- sizeof(day_text),
- "%a",
- t->tick_time);
- string_format_time(month_text,
- sizeof(month_text),
- "%b",
- t->tick_time);
- string_format_time(daynum_text,
- sizeof(daynum_text),
- "%d",
- t->tick_time);
- upcase(day_text);
- upcase(month_text);
- date_layer_set_text(&date_layer, day_text, month_text, daynum_text);
- }
Advertisement
Add Comment
Please, Sign In to add comment