Skip to content

Timer countdown start contract for multiple calls #106

Open
@droogmic

Description

@droogmic

The countdown trait states:

self.start(count); block!(self.wait()); MUST block for AT LEAST the time specified by count.

The effect of calling start a second time is unclear.

One interpretation is that the countdown restarts; consider a countdown that does not restart (possibly because cancel has not been called):

self.start(5);
nop;
self.start(10);
block!(self.wait());

The contract on self.start(10) would not hold. (This is true even if this were an upcounting timer and the final count were updated by self.start(10) , as the timer count has already increased.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions