another hap time introspection method
This commit is contained in:
parent
04a0952a22
commit
060d2cfe2b
1 changed files with 3 additions and 0 deletions
|
|
@ -66,6 +66,9 @@ export class Hap {
|
||||||
isInNearFuture(margin, currentTime) {
|
isInNearFuture(margin, currentTime) {
|
||||||
return currentTime < this.whole.begin && currentTime > this.whole.begin - margin;
|
return currentTime < this.whole.begin && currentTime > this.whole.begin - margin;
|
||||||
}
|
}
|
||||||
|
isWithinTime(min, max) {
|
||||||
|
return this.whole.begin <= max && this.endClipped >= min;
|
||||||
|
}
|
||||||
|
|
||||||
wholeOrPart() {
|
wholeOrPart() {
|
||||||
return this.whole ? this.whole : this.part;
|
return this.whole ? this.whole : this.part;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue