Options
All
  • Public
  • Public/Protected
  • All
Menu

A ng service handles the UI system clock logic. The UI system clock is mainly responsible for periodically update the system-wide clock to other components. Using clock provided by this service instead of using setInterval() or setTimeout() method may be more benefitial in many circumstances. For example, if you have many UI components needed to be periodically updated itself in background, without this service, you may need to use setTimeout() / setInterval() method for each component. This leads to having poor application's performance. In spite of that, you can use the system clock provided by this service to let all UI components being updated at the same clock tick rate. Furthermore, this service also provides you a capability to configure its interval. So, you can haste up or slow down system-wide UI updating rate in a single place.

author

shiorin, tee4cute

Hierarchy

  • UISystemClock

Index

Constructors

constructor

  • Returns UISystemClock

Properties

Private currentDateTime

currentDateTime: Date

Private delayTimer

delayTimer: any

Private phloxAppInfo

phloxAppInfo: PhloxAppInfo

Private timerInterval

timerInterval: number

Methods

getCurrentClockDateTime

  • getCurrentClockDateTime(): Date
  • Get current system clock datetime.

    Returns Date

    A Date object representing current system datetime.

getCurrentClockTime

  • getCurrentClockTime(): number
  • Get current system clock time in milliseconds.

    Returns number

    A number representing current system datetime in milliseconds.

Private updateTimerInterval

  • updateTimerInterval(): void
  • Returns void

Generated using TypeDoc