How to use the cyclejs.Rx.VirtualTimeScheduler function in cyclejs

To help you get started, we’ve selected a few cyclejs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github staltz / rxmarbles / src / components / sandbox / sandbox-output.js View on Github external
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;
}