Loading...
Searching...
No Matches
health_store_parts.h
Go to the documentation of this file.
1
8#pragma once
9#include <pebble.h>
10
15
19void health_store_redraw(void);
20
32time_t health_hour_start(const struct tm *today, int hour);
33
34#if defined(PBL_HEALTH)
43bool health_metric_available(HealthMetric metric, time_t start, time_t end);
44
54HealthMinuteData *health_scratch_take(int records);
55
63typedef void (*MinuteRecordFn)(int hour, const HealthMinuteData *record, void *context);
64
84bool health_walk_minute_log(const struct tm *local, int first_hour, int end_hour, time_t until,
85 MinuteRecordFn each, void *context);
86#endif
87
time_t health_hour_start(const struct tm *today, int hour)
When a local hour of today starts.
Definition health_store.c:138
void(*) MinuteRecordFn(int hour, const HealthMinuteData *record, void *context)
Called for each good record a walk of the minute log finds.
Definition health_store_parts.h:63
void health_store_redraw(void)
Asks the face to redraw, for a part whose own timer changed what it holds.
Definition health_store.c:463
bool health_metric_available(HealthMetric metric, time_t start, time_t end)
Whether the watch actually has a reading for a metric over a time span.
Definition health_store.c:72
HealthMinuteData * health_scratch_take(int records)
Allocate scratch room for a minute-history read, off the heap for the length of the read rather than ...
Definition health_store.c:131
bool health_walk_minute_log(const struct tm *local, int first_hour, int end_hour, time_t until, MinuteRecordFn each, void *context)
Walks the watch's minute log over today's hours and hands each good record, with the hour it falls in...
Definition health_store.c:150