Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return [...messages, ...nodeMessages].sort((a, b) => TimeUtil.compare(a.receiveTime, b.receiveTime));
}
return stamps.sort((a, b) => -TimeUtil.compare(a, b));
}
export function clampTime(time: Time, start: Time, end: Time): Time {
if (TimeUtil.compare(start, time) > 0) {
return start;
}
if (TimeUtil.compare(end, time) < 0) {
return end;
}
return time;
}
(msg) => TimeUtil.compare(start, msg.receiveTime) < 1 && TimeUtil.compare(end, msg.receiveTime) > -1
);
resolve(messages.sort((a, b) => TimeUtil.compare(a.receiveTime, b.receiveTime)));
this._lastResolvedCallbackEnd = blockRange.end;
export function clampTime(time: Time, start: Time, end: Time): Time {
if (TimeUtil.compare(start, time) > 0) {
return start;
}
if (TimeUtil.compare(end, time) < 0) {
return end;
}
return time;
}