(location: string, task?: ServerTask, output?: string)
| 1503 | } |
| 1504 | |
| 1505 | #forceYield(location: string, task?: ServerTask, output?: string) { |
| 1506 | const timeRemaining = this.#getRemainingTimeInMillis(); |
| 1507 | |
| 1508 | if (timeRemaining) { |
| 1509 | if (task) { |
| 1510 | throw new AutoYieldWithCompletedTaskExecutionError( |
| 1511 | task.id, |
| 1512 | task.outputProperties ?? [], |
| 1513 | { |
| 1514 | location, |
| 1515 | timeRemaining, |
| 1516 | timeElapsed: this.#getTimeElapsed(), |
| 1517 | }, |
| 1518 | output |
| 1519 | ); |
| 1520 | } else { |
| 1521 | throw new AutoYieldExecutionError(location, timeRemaining, this.#getTimeElapsed()); |
| 1522 | } |
| 1523 | } |
| 1524 | } |
| 1525 | |
| 1526 | #getTimeElapsed() { |
| 1527 | return performance.now() - this._timeOrigin; |
no test coverage detected