another hap time introspection method

This commit is contained in:
Felix Roos 2024-03-28 06:50:13 +01:00
parent 04a0952a22
commit 060d2cfe2b

View File

@ -66,6 +66,9 @@ export class Hap {
isInNearFuture(margin, currentTime) {
return currentTime < this.whole.begin && currentTime > this.whole.begin - margin;
}
isWithinTime(min, max) {
return this.whole.begin <= max && this.endClipped >= min;
}
wholeOrPart() {
return this.whole ? this.whole : this.part;