Skip to content

Commit

Permalink
Clarification of delay
Browse files Browse the repository at this point in the history
  • Loading branch information
sbellware committed Jan 11, 2019
1 parent 311afeb commit df75a05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -105,11 +105,11 @@ The delay condition can varied by specifying a lambda that will be evaluated to
delay_condition = -> { |result| result.even?(result) }

Poll.(interval_milliseconds: 100, delay_condition: delay_condition) do
2 # Result is even, therefore poll loop restarts
2 # Result is even, therefore delay 100 milliseconds and re-execute the block
end

Poll.(interval_milliseconds: 100, delay_condition: delay_condition) do
3 # Result is odd, therefore poll loop ends
3 # Result is odd, therefore end the poll loop
end
```

Expand Down

0 comments on commit df75a05

Please sign in to comment.