Open
Description
The countdown trait states:
self.start(count); block!(self.wait());
MUST block for AT LEAST the time specified bycount
.
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
Labels
No labels