From 146aa9755afe0e2a9fd85e63d9390e66122f0a73 Mon Sep 17 00:00:00 2001 From: hyunuktak Date: Wed, 4 Jul 2018 15:13:27 +0900 Subject: [PATCH] Sync current time Change-Id: I0b741ffd37d3848a6ce01c260908e3acd8b80cf2 Signed-off-by: hyunuktak --- src/monitor/stc-monitor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/monitor/stc-monitor.c b/src/monitor/stc-monitor.c index 8ee3533..9db1cfb 100755 --- a/src/monitor/stc-monitor.c +++ b/src/monitor/stc-monitor.c @@ -1013,7 +1013,8 @@ static gboolean __update_app_statistics(gpointer key, gpointer value, static gboolean __flush_apps_stats_to_database(gpointer user_data) { - time_t current_time = time(0); + time_t current_time = 0; + time(¤t_time); if (g_system->apps_tree_updated == FALSE) return G_SOURCE_REMOVE; @@ -1109,7 +1110,7 @@ static void __interface_counter_update(stc_app_key_s *app_key, context->counter->iftype == STC_IFACE_USB) || (app_value->classid == STC_TETHERING_APP_CLASSID && context->counter->iftype == STC_IFACE_P2P)) - __app_counter_update(app_key, app_value, context); + __app_counter_update(app_key, app_value, context); } -- 2.7.4