Skip to content

time: Tick and NewTicker inconsistency #14557

@justinmayhew

Description

@justinmayhew

NewTicker will panic if the duration isn't greater than zero, while Tick will return nil.

Ideally Tick would panic as well but that could potentially break some code relying on this inconsistency. This special case should be documented as it's definitely not something you'd expect from reading the current Tick documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions