blob: dfa956f10a62d53fda446220dc4b067916415ffe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
export interface Request {
request: any;
to: any;
}
export class RequestStats {
milliSecondsInterval: number;
remainingMilliSeconds: number;
requests: Request[];
constructor(hash: {
milliSecondsInterval: number,
remainingMilliSeconds: number,
requests: Request[];
}) {
this.milliSecondsInterval = hash.milliSecondsInterval;
this.remainingMilliSeconds = hash.remainingMilliSeconds;
this.requests = hash.requests;
}
get remainingSeconds() {
return Math.floor(this.remainingMilliSeconds / 1000);
}
get secondsInterval() {
return Math.floor(this.milliSecondsInterval / 1000);
}
}
|