timeout
timeout
Timeout implementation for Crystal.
Installation
Add this to your application's shard.yml
:
dependencies:
timeout:
github: andrius/timeout
Usage
require "timeout"
Sample:
res = Timeout.timeout(0.1) do
puts "this line will be printed"
sleep 0.2
puts "this line won't be printed"
end
# will print false
puts "Result: #{res}"
Contributing
- Fork it ( https://github.com/ctiapps/timeout/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- andrius Andrius Kairiukstis - creator, maintainer
Repository
timeout
Owner
Statistic
- 1
- 0
- 0
- 1
- 0
- over 7 years ago
- March 20, 2017
License
MIT License
Links
Synced at
Sun, 24 Nov 2024 17:35:59 GMT
Languages