* The number of milliseconds elapsed since the epoch (January 1, 1970 00:00:00 UTC) for the fake time. * * @example Usage * ```ts * import { FakeTime } from "@std/testing/time"; * import { assertEquals } from "@std/assert"; * * const fakeTime = new FakeTime(15_000); * * as
()
| 475 | * @returns The number of milliseconds elapsed since the epoch (January 1, 1970 00:00:00 UTC) for the fake time |
| 476 | */ |
| 477 | get now(): number { |
| 478 | return now; |
| 479 | } |
| 480 | /** |
| 481 | * Set the current time. It will call any functions waiting to be called between the current and new fake time. |
| 482 | * If the timer callback throws, time will stop advancing forward beyond that timer. |
no test coverage detected