Utility class which exposes functions for managing date and time operations.

Hierarchy

  • TimeUtils

Constructors

Methods

  • Waits for t number of milliseconds

    Type Parameters

    • T

    Parameters

    • t: number

      number

    • Optional value: T

      T

    Returns Promise<void | T>

  • check if a token is expired based on given UTC time in seconds.

    Parameters

    • expiresOn: string
    • offset: number

    Returns boolean

  • return the current time in Unix time (seconds).

    Returns number

  • If the current time is earlier than the time that a token was cached at, we must discard the token i.e. The system clock was turned back after acquiring the cached token

    Parameters

    • cachedAt: string

    Returns boolean

Generated using TypeDoc