rxjs / latest / api / index / interface / timestampprovider.html

TimestampProvider

interface stable

This is a type that provides a method to allow RxJS to create a numeric timestamp

interface TimestampProvider {
  now(): number
}

Child Interfaces

Methods

now(): number

Returns a timestamp as a number.

Parameters

There are no parameters.

Returns

number

This is used by types like ReplaySubject or operators like timestamp to calculate the amount of time passed between events.

© 2015–2022 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors.
Code licensed under an Apache-2.0 License. Documentation licensed under CC BY 4.0.
https://rxjs.dev/api/index/interface/TimestampProvider