This repository has been archived by the owner on Oct 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
sp core library.timeprovider
John Nguyen edited this page Apr 22, 2021
·
2 revisions
Home > @microsoft/sp-core-library > TimeProvider
This is the default implementation of ITimeProvider that simply calls the real browser APIs.
Signature:
export default class TimeProvider implements ITimeProvider
Implements: ITimeProvider
Constructor | Modifiers | Description |
---|---|---|
(constructor)(serviceScope) | Constructs a new instance of the TimeProvider class |
Property | Modifiers | Type | Description |
---|---|---|---|
serviceKey | static |
ServiceKey<ITimeProvider> | The service key for ITimeProvider. |
Method | Modifiers | Description |
---|---|---|
getDate() | Returns the current date/time, similar to the Date class constructor. | |
getTimestamp() | Returns a DOMHighResTimeStamp timing measurement, as defined by the standard performance.now() API. |