@muspellheim/shared
    Preparing search index...

    Class Clock

    A clock provides access to the current timestamp.

    Index

    Methods

    • Return the current timestamp of the clock.

      Returns Date

      The current timestamp.

    • Return the current timestamp of the clock in milliseconds.

      Returns number

      The current timestamp in milliseconds.

    • Create a clock using a fixed date.

      Parameters

      • date: string | number | Date

        The fixed date of the clock.

      Returns Clock

      A clock that always returns a fixed date.

    • Create a clock that returns a fixed offset from the given clock.

      Parameters

      • clock: Clock

        The clock to offset from.

      • offsetMillis: number

        The offset in milliseconds.

      Returns Clock

      A clock that returns a fixed offset from the given clock.