`asyncdispatch.drain` returns before timeout even if there are pending operations
### Description

In following example code, `drain(1000)` blocks only for 400 milliseconds. It should block for 1000 milliseconds as long as there is at least one pending operation.

```nim
import std/[asyncdispatch, monotimes, times]

proc sleep() {.async.} =
  for i in 0 .. 30:
    await sleepAsync(100)
    stdout.write "."

asyncCheck sleep()
while hasPendingOperations():
  let start = getMonoTime()
  drain(1000)
  echo (getMonoTime() - start).inMilliseconds
```

### Nim Version

Nim Compiler Version 2.3.1 [Linux: amd64]
Compiled at 2024-12-04
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: c3120b6121506878f551477ed07d4c29a47f79a1
active boot switches: -d:release

### Current Output

```text
....401
....400
....400
....400
....401
....400
....400
...300
```


### Expected Output

```text
..........1000
..........1000
..........1000
```


### Known Workarounds

_No response_

### Additional Information

_No response_