11void UpdateSensorLatency(
double time, gpointer cur_reading, GSList **history,
double latency, gpointer sensor_reading)
17 *history = g_slist_prepend(*history, cur_read);
19 GSList *last = g_slist_last(*history);
20 while (last && ((
struct BoozDatedSensor *)last->data)->time < time - latency) {
21 *history = g_slist_remove_link(*history, last);
25 last = g_slist_last(*history);
33 gpointer sensor_reading)
38 cur_read->
value = (
double *)
g_memdup2(cur_reading,
sizeof(
double));
39 *history = g_slist_prepend(*history, cur_read);
41 GSList *last = g_slist_last(*history);
43 *history = g_slist_remove_link(*history, last);
47 last = g_slist_last(*history);