Methods
Private
_start
- _start(name: string): void
-
Returns void
addTask
- addTask(name: string, handler?: (() => void), interval?: number, option?: {
immediate: undefined | boolean;
}): void
-
Parameters
-
name: string
-
handler: (() => void) = ...
-
interval: number = 1e4
-
option: {
immediate: undefined | boolean;
} = {}
-
immediate: undefined | boolean
Returns void
checkExisted
- checkExisted(taskName: string): boolean
-
Returns boolean
getTaskCount
- getTaskCount(): number
-
Returns number
resetTaskList
- resetTaskList(): void
-
Returns void
restart
- restart(clear?: boolean): void
-
Returns void
startAll
- startAll(): void
-
Returns void
stop
- stop(name: string, remove?: boolean): void
-
Parameters
-
name: string
-
remove: boolean = true
Returns void
stopAll
- stopAll(remove?: boolean): void
-
Returns void
Description
添加任务