* Sets the current time to the given epoch. * @param {number} time The epoch to set the current time to.
(time = kInitialEpoch)
| 772 | * @param {number} time The epoch to set the current time to. |
| 773 | */ |
| 774 | setTime(time = kInitialEpoch) { |
| 775 | validateNumber(time, 'time'); |
| 776 | this.#assertTimeArg(time); |
| 777 | this.#assertTimersAreEnabled(); |
| 778 | |
| 779 | this.#now = time; |
| 780 | } |
| 781 | |
| 782 | /** |
| 783 | * An alias for `this.reset()`, allowing the disposal of the `MockTimers` instance. |
no test coverage detected