Skip to content

Commit

Permalink
doc(Add): Clarify side-effects are best-effort
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav committed Sep 8, 2023
1 parent 81e16be commit 8b81867
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/ztest/clock.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,13 @@ func (c *MockClock) NewTicker(d time.Duration) *time.Ticker {
}

// Add progresses time by the given duration.
//
// Other operations waiting for the time to advance
// will be resolved if they are within range.
//
// Side effects of operations waiting for the time to advance
// will take effect on a best-effort basis.
// Avoid racing with operations that have side effects.
//
// Panics if the duration is negative.
func (c *MockClock) Add(d time.Duration) {
if d < 0 {
Expand Down

0 comments on commit 8b81867

Please sign in to comment.