MCPcopy Create free account
hub / github.com/denoland/std / now

Method now

testing/time.ts:477–479  ·  view source on GitHub ↗

* 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

()

Source from the content-addressed store, hash-verified

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.

Callers 15

setMethod · 0.80
#resetTtlMethod · 0.80
verifyMessageFunction · 0.80
generateFunction · 0.80
v7_test.tsFile · 0.80
queueTimeoutFunction · 0.80
constructorMethod · 0.80
stateMethod · 0.80
executeMethod · 0.80
forceOpenMethod · 0.80

Calls 8

minMethod · 0.80
hasMethod · 0.65
setMethod · 0.65
deleteMethod · 0.65
findMethod · 0.45
insertMethod · 0.45
pushMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected