@most/scheduler
Version:
Reactive programming with lean, functions-only, curried, tree-shakeable API
25 lines (24 loc) • 976 B
TypeScript
/** @license MIT License (c) copyright 2010-2017 original author or authors */
import { Clock, Time } from '@most/types';
export declare class RelativeClock implements Clock {
private readonly clock;
private readonly origin;
constructor(clock: Clock, origin: Time);
now(): Time;
}
export declare class HRTimeClock implements Clock {
private readonly hrtime;
private readonly origin;
constructor(hrtime: (time: [number, number]) => [number, number], origin: [Time, Time]);
now(): Time;
}
export declare const clockRelativeTo: (clock: Clock) => Clock;
export declare const newPerformanceClock: () => Clock;
/**
* @deprecated will be removed in 2.0.0
* Date.now is not monotonic, and performance.now is ubiquitous:
* @see https://caniuse.com/#search=performance.now
*/
export declare const newDateClock: () => Clock;
export declare const newHRTimeClock: () => Clock;
export declare const newPlatformClock: () => Clock;