Skip to content

Pause feature #11

@henry-brisson

Description

@henry-brisson

Calling meter.pause(1000) should pause regeneration for 1 second.

Takes a second parameter with timestamp.

If calling pause and the meter is already paused, clears the previous pause.

Consider adding support for pause increments, where calling pause with an increment does not pause a paused meter, but stacks its paused duration. Perhaps something like: meter.pause({duration: 1000, increment: true}) or not using object destructuring.

Other considerations:

  • pause() without parameters may pause the meter forever
  • implement resume() to clear any ongoing pauses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions