From 599482884aadea2b44ef2b641dd3c2be99217dac Mon Sep 17 00:00:00 2001 From: Timo Kokkonen Date: Fri, 28 Feb 2014 21:16:04 +0200 Subject: [PATCH] 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 --- data.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.44.0