website service tests
This commit is contained in:
@@ -8,7 +8,9 @@ import { Blocker } from './Blocker';
|
||||
export class ThrottleBlocker extends Blocker {
|
||||
private lastExecutionTime = 0;
|
||||
|
||||
constructor(private readonly delayMs: number) {}
|
||||
constructor(private readonly delayMs: number) {
|
||||
super();
|
||||
}
|
||||
|
||||
canExecute(): boolean {
|
||||
return Date.now() - this.lastExecutionTime >= this.delayMs;
|
||||
|
||||
Reference in New Issue
Block a user