Type alias ClockParams

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

Type declaration

  • Optional mode?: ClockMode

    The mode the clock should run in.

    '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.

    Default: 'stopwatch'

  • Optional interval?: Duration | DurationParams | number

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

    A number value will be treated as milliseconds.

    Default: 500ms

  • Optional target?: Duration | DurationParams | number

    The target value for the clock. This is where counting will finish.

    A number value will be treated as milliseconds.

    Default: 0s in countdown mode OR MAX_SAFE_INTERGER millis in stopwatch mode

  • Optional initial?: Duration | DurationParams | number

    The initial value on the clock. This is where counting will start from.

    A number value will be treated as milliseconds.

    Default: 0s

Generated using TypeDoc