Type alias ClockParams

ClockParams: {
    mode?: ClockMode;
    interval?: Duration;
    target?: Duration;
    initial?: Duration;
}

Type declaration

  • Optional mode?: ClockMode

    The mode the clock should run in. Defaults to 'stopwatch'.

    'stopwatch' - clock will count forwards through time. If initial is greater than target, the clock will stop instantly.

    'countdown' - clock will count backwards through time. If initial is less than target, the clock will stop instantly.

  • Optional interval?: Duration

    The frequency of the update loop. Defaults to 500ms. Values of zero or less will cause updates as fast as possible (not recommended).

  • Optional target?: Duration

    The target value for the clock. This is where counting will finish. Default: 0s

  • Optional initial?: Duration

    The initial value on the clock. This is where counting will start from. Default: 0s

Generated using TypeDoc