Class: SystemClock
The real clock. It looks the globals up on every call, so tests that use mock.timers still work.
Implements
Constructors
Constructor
new SystemClock():
SystemClock
Returns
SystemClock
Properties
instance
readonlystaticinstance:SystemClock
Methods
now()
now():
number
milliseconds since the epoch, like Date.now()
Returns
number
Implementation of
setTimeout()
setTimeout(
fn,ms):Timeout
like the global setTimeout; the handle is only meant for clearTimeout
Parameters
fn
() => void
ms
number
Returns
Timeout
Implementation of
clearTimeout()
clearTimeout(
handle):void
Parameters
handle
unknown
Returns
void
Implementation of
setInterval()
setInterval(
fn,ms):Timeout
like the global setInterval; the handle is only meant for clearInterval
Parameters
fn
() => void
ms
number
Returns
Timeout
Implementation of
clearInterval()
clearInterval(
handle):void
Parameters
handle
unknown
Returns
void