From: Timo Kokkonen Date: Fri, 28 Feb 2014 19:16:04 +0000 (+0200) Subject: data.c: Reset time stamp when starting new log X-Git-Url: http://git.itanic.dy.fi/?p=log-plotter;a=commitdiff_plain data.c: Reset time stamp when starting new log Whenever we start logging a new charging session, start counting the time from zero. Signed-off-by: Timo Kokkonen --- diff --git a/data.c b/data.c index c577a6e..56a6b72 100644 --- a/data.c +++ b/data.c @@ -328,6 +328,8 @@ static int read_data(struct eventhandler_entry *h) return 0; if (state_has_changed()) { + dt->start_time = time(NULL); + data.timestamp = 0; store_str_variable_value_to_array("status", state_to_str(plotter_state.system_status), dt->cfg);