diff options
author | Richard Hughes <richard@hughsie.com> | 2008-11-07 12:26:47 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2008-11-07 12:26:47 +0000 |
commit | eded5b20fc7b609f846a46c347b25109a40191a5 (patch) | |
tree | 75a193f5d0445c27c75d3a696779450299db1978 /src/dkp-history.c | |
parent | f5ea862a06a43c804fa23f289727132602c851b3 (diff) |
feature: all logging for all the other device types too
Diffstat (limited to 'src/dkp-history.c')
-rw-r--r-- | src/dkp-history.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/dkp-history.c b/src/dkp-history.c index 75fc26c..513a9ad 100644 --- a/src/dkp-history.c +++ b/src/dkp-history.c @@ -179,6 +179,7 @@ dkp_history_copy_array_timespan (const EggObjList *array, guint timespan) /* treat the timespan like a range, and search backwards */ obj = (const DkpHistoryObj *) egg_obj_list_index (array, array->len-1); start = obj->time; + timespan *= 0.95f; for (i=array->len-1; i>0; i--) { obj = (const DkpHistoryObj *) egg_obj_list_index (array, i); if (start - obj->time < timespan) @@ -440,9 +441,10 @@ dkp_history_schedule_save (DkpHistory *history) { gboolean ret; - /* if low power, then don't batch up save requests */ + /* TODO: if low power, then don't batch up save requests */ ret = dkp_history_is_low_power (history); - if (ret) { + if (FALSE && ret) { + egg_warning ("saving directly to disk as low power"); dkp_history_save_data (history); return TRUE; } @@ -706,7 +708,8 @@ dkp_history_finalize (GObject *object) history = DKP_HISTORY (object); /* save */ - dkp_history_save_data (history); + if (history->priv->id != NULL) + dkp_history_save_data (history); g_object_unref (history->priv->data_rate); g_object_unref (history->priv->data_charge); |