summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-11-12 23:09:57 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-13 11:55:19 +0900
commit4bb8368a20ad03cb5c1c9134df0a55a653c10cf0 (patch)
treefe870f50d62077dbf762cc93a4c2790e86b94e4e /profile.c
parentdbd4a471ecfa2901b1384f361549c6bbadc84c55 (diff)
downloadsubsurface-4bb8368a20ad03cb5c1c9134df0a55a653c10cf0.tar.gz
Introduce an on/off switch for calculating ndl/tts
Let the user choose if the calculation of ndl and tts is worth the time it takes. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/profile.c b/profile.c
index edeb17a9d..303da6998 100644
--- a/profile.c
+++ b/profile.c
@@ -1014,6 +1014,11 @@ static void calculate_deco_information(struct dive *dive, struct divecomputer *d
entry->ceilings[k] = deco_allowed_depth(tolerated_by_tissue[k], surface_pressure, dive, 1);
/* calculate DECO STOP / TTS / NDL */
+
+ /* bail if we shouldn't */
+ if (!prefs.calc_ndl_tts)
+ continue;
+
/* We are going to mess up deco state, so store it for later restore */
char *cache_data = NULL;
cache_deco_state(tissue_tolerance, &cache_data);