Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function makeScheduler() {
let scheduler = new Rx.VirtualTimeScheduler(0, (x, y) => {
if (x > y) { return 1; }
if (x < y) { return -1; }
return 0;
});
scheduler.add = (absolute, relative) => (absolute + relative);
scheduler.toDateTimeOffset = (absolute => Math.floor(absolute));
scheduler.toRelative = (timeSpan => timeSpan);
return scheduler;
}