sp core library.timeprovider - microsoft/Viva-Connections-Extensibility-Beta GitHub Wiki
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 ITimeProviderImplements: 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. |