Skip to content

Fixing set_periodic example #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs_md/core_manual_ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ The return value of the method is a unique timer id. You can use this to subsequ

You can also set a timer to fire periodically by using the `set_periodic` function. There will be an initial delay equal to the period. The return value of `set_periodic` is a unique timer id (number). This can be later used if the timer needs to be cancelled. The argument passed into the timer event handler is also the unique timer id:

timer_id = Vertx.set_timer(1000) do |timer_id|
timer_id = Vertx.set_periodic(1000) do |timer_id|
puts 'And every second this is printed'
end

Expand Down