TimeProvider class
This is the default implementation of ITimeProvider that simply calls the real browser APIs.
Constructors
(constructor)(service |
Constructs a new instance of the |
Properties
service |
The service key for ITimeProvider. |
Methods
get |
Returns the current date/time, similar to the Date class constructor. |
get |
Returns a DOMHighResTimeStamp timing measurement, as defined by the standard performance.now() API. |
Constructor Details
(constructor)(serviceScope)
Constructs a new instance of the TimeProvider
class
constructor(serviceScope: ServiceScope);
Parameters
- serviceScope
- ServiceScope
Property Details
serviceKey
The service key for ITimeProvider.
static readonly serviceKey: ServiceKey<ITimeProvider>;
Property Value
Method Details
getDate()
Returns the current date/time, similar to the Date class constructor.
getDate(): Date;
Returns
Date
getTimestamp()
Returns a DOMHighResTimeStamp timing measurement, as defined by the standard performance.now() API.
getTimestamp(): number;
Returns
number