In a Beacon-internal project, we've found this function useful:
function intersection_duration(ts1::TimeSpan, ts2::TimeSpan)
duration = min(stop(ts1), stop(ts2)) - max(start(ts1), start(ts2))
return max(duration, zero(duration))
end
Is it worth upstreaming here?
In a Beacon-internal project, we've found this function useful:
Is it worth upstreaming here?