dashboard
repositories
filestore
activity
search
login
刘苏义
/
ruoyi-api
forked from
ard/ruoyi-api
summary
commits
tree
docs
forks
compare
blame
|
history
|
raw
雷达历史查询按时间倒序
‘liusuyi’
2023-07-01
d4c8d8c629a08b392c185ff5fa34a6d4e46e1d4d
[~liusuyi/ruoyi-api.git]
/
ruoyi-ui
/
node_modules
/
rxjs
/
_esm2015
/
internal
/
operators
/
timeInterval.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { async } from '../scheduler/async';
import { scan } from './scan';
import { defer } from '../observable/defer';
import { map } from './map';
export function timeInterval(scheduler = async) {
return (source) => defer(() => {
return source.pipe(scan(({ current }, value) => ({ value, current: scheduler.now(), last: current }), { current: scheduler.now(), value: undefined, last: undefined }), map(({ current, last, value }) => new TimeInterval(value, current - last)));
});
}
export class TimeInterval {
constructor(value, interval) {
this.value = value;
this.interval = interval;
}
}
//# sourceMappingURL=timeInterval.js.map