summaryrefslogtreecommitdiffstats
path: root/core/statistics.h
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2016-11-10 10:15:11 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-11-15 03:25:46 -0800
commit20e211d33790463d75f254612d6b7be50c8d1a00 (patch)
tree9adb6608dd171595b4e6a4b94ef5a2f67b73bf72 /core/statistics.h
parent2d69f8c9d09af18355c37e90eb970c5b33936d59 (diff)
downloadsubsurface-20e211d33790463d75f254612d6b7be50c8d1a00.tar.gz
Only consider non-zero average depth for statistics
Upon importing dives, the average depth can be undefined which we store as 0. This zero should not contribute when computing the average depth for the (yearly) statistics, only dives with average depth set now contribute. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/statistics.h')
-rw-r--r--core/statistics.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/statistics.h b/core/statistics.h
index 015c3481e..732ae79cd 100644
--- a/core/statistics.h
+++ b/core/statistics.h
@@ -16,6 +16,8 @@ typedef struct
{
int period;
duration_t total_time;
+ /* total time of dives with non-zero average depth */
+ duration_t total_average_depth_time;
/* avg_time is simply total_time / nr -- let's not keep this */
duration_t shortest_time;
duration_t longest_time;