import type { PositiveInteger } from '@chzky/core'; /** ## `sleep` : 协程休眠 @example Usage ```ts const now = Date.now() await sleep(1000) assert(Date.now() - now > 1000) ``` @example Usage - range ```ts const now = Date.now() await sleep.range(1000, 1500) const diff_time = Date.now() - now assert(diff_time > 1000 && diff_time < 1700) ``` @category async */ interface Sleep { (ms: PositiveInteger): Promise; /** `range` : 在一个时间范围内进行协程休眠 @example Usage - range ```ts const now = Date.now() await sleep.range(1000, 1500) // or sleep.range(1500,1000) const diff_time = Date.now() - now assert(diff_time > 1000 && diff_time < 1700) ``` */ range(start: PositiveInteger, end: PositiveInteger): Promise; } export declare const sleep: Sleep; export {}; //# sourceMappingURL=sleep.d.ts.map