Skip to content

Commit a36a23b

Browse files
Merge pull request #1506 from mikelfried/seconds-task-scheduling
docs(task-scheduling): change seconds argument
2 parents ee04ef7 + 2e3de32 commit a36a23b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

content/techniques/task-scheduling.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,12 @@ clearInterval(interval);
286286
**Create** a new interval dynamically using the `SchedulerRegistry.addInterval()` method, as follows:
287287

288288
```typescript
289-
addInterval(name: string, seconds: string) {
289+
addInterval(name: string, milliseconds: number) {
290290
const callback = () => {
291-
this.logger.warn(`Interval ${name} executing at time (${seconds})!`);
291+
this.logger.warn(`Interval ${name} executing at time (${milliseconds})!`);
292292
};
293293

294-
const interval = setInterval(callback, seconds);
294+
const interval = setInterval(callback, milliseconds);
295295
this.scheduler.addInterval(name, interval);
296296
}
297297
```
@@ -335,12 +335,12 @@ clearTimeout(timeout);
335335
**Create** a new timeout dynamically using the `SchedulerRegistry.addTimeout()` method, as follows:
336336

337337
```typescript
338-
addTimeout(name: string, seconds: string) {
338+
addTimeout(name: string, milliseconds: number) {
339339
const callback = () => {
340-
this.logger.warn(`Timeout ${name} executing after (${seconds})!`);
340+
this.logger.warn(`Timeout ${name} executing after (${milliseconds})!`);
341341
};
342342

343-
const timeout = setTimeout(callback, seconds);
343+
const timeout = setTimeout(callback, milliseconds);
344344
this.scheduler.addTimeout(name, timeout);
345345
}
346346
```

0 commit comments

Comments
 (0)