Add the following code to your project's shard.yml under:
dependencies
to use in production
- OR -
development_dependencies
to use in development
Timers and intervalls
Add the dependency to your shard.yml
:
dependencies:
time_utils:
github: data-niklas/time_utils
Run shards install
require "time_utils"
Timer.run(5.seconds) do |timer|
puts "5 seconds"
end
timer2 = Timer.new(3.seconds) do |timer|
puts Time.utc - timer.at
end
timer2.run
Javascript like methods are exposed
setTimeout(1000) do |timer|
puts "1 second"
end
Recurring events:
Timer.run(5.seconds,true) do |timer|
puts "Every 5 seconds"
end
TODO: Write usage instructions here
TODO: Write development instructions here
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)