summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/dive.c b/dive.c
index 02c1090d9..aadddfd14 100644
--- a/dive.c
+++ b/dive.c
@@ -2807,6 +2807,11 @@ struct dive *find_dive_including(timestamp_t when)
return NULL;
}
+bool time_during_dive_with_offset(struct dive *dive, timestamp_t when, timestamp_t offset)
+{
+ return dive->when - offset <= when && when <= dive->when + dive->duration.seconds + offset;
+}
+
bool dive_within_time_range(struct dive *dive, timestamp_t when, timestamp_t offset)
{
return when - offset <= dive->when && dive->when + dive->duration.seconds <= when + offset;