* @internal * Throws a MongoOperationTimeoutError if the context has expired. * If the context has not expired, returns the `remainingTimeMS`
(message?: string)
| 309 | * If the context has not expired, returns the `remainingTimeMS` |
| 310 | **/ |
| 311 | getRemainingTimeMSOrThrow(message?: string): number { |
| 312 | const { remainingTimeMS } = this; |
| 313 | if (remainingTimeMS <= 0) |
| 314 | throw new MongoOperationTimeoutError(message ?? `Expired after ${this.timeoutMS}ms`); |
| 315 | return remainingTimeMS; |
| 316 | } |
| 317 | |
| 318 | /** |
| 319 | * @internal |
no outgoing calls
no test coverage detected