The optional maximum time to wait, in milliseconds.
Returns Promise<void>
A promise that isn't resolved until the count reaches zero.
If a timeout is given and it expires, the promise will be rejected.
countDown
countDown(): void
Decreases the count by one. If the count reaches zero, all promises returned by the await methods will be resolved.
If the count was already zero nothing happens.
The number of times
countDown
must be invoked before promises returned byawait
are resolved.