Add web front-end and fix API issues
This commit is contained in:
1 parent
45ca4de0ad
commit
a7524412f0
2571 files changed
+86998
-5
No files matched your search
+21
@@ -0,0 +1,21 @@
|
||||
import { asyncScheduler } from '../scheduler/async';
|
||||
import { operate } from '../util/lift';
|
||||
import { createOperatorSubscriber } from './OperatorSubscriber';
|
||||
export function timeInterval(scheduler = asyncScheduler) {
|
||||
return operate((source, subscriber) => {
|
||||
let last = scheduler.now();
|
||||
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
|
||||
const now = scheduler.now();
|
||||
const interval = now - last;
|
||||
last = now;
|
||||
subscriber.next(new TimeInterval(value, interval));
|
||||
}));
|
||||
});
|
||||
}
|
||||
export class TimeInterval {
|
||||
constructor(value, interval) {
|
||||
this.value = value;
|
||||
this.interval = interval;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=timeInterval.js.map
|
||||
Reference in new issue
Block a user