儀表板
文件庫
filestore
活動
搜尋
登入
pcalife
/
PAM
保誠-保戶業務員媒合平台
匯總
相關日誌
提交
目錄
檔案區
分支(forks)
比對
究查
|
歷程
|
原始
Revert "Update#139889 [ 快速篩選 ] 年資文案調整"
HelenHuang
2022-06-09
26fa49f4b0aa658d65a21fffe828f39e78302573
[pcalife/PAM.git]
/
PAMapp
/
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