Navigation Menu

Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Oct 3, 2019
1 parent 4463d38 commit bab8300
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
@@ -1,8 +1,11 @@
# Timeout

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/timeout`. To experiment with that code, run `bin/console` for an interactive prompt.
Timeout provides a way to auto-terminate a potentially long-running
operation if it hasn't finished in a fixed amount of time.

TODO: Delete this and the text above, and describe your gem
Previous versions didn't use a module for namespacing, however
#timeout is provided for backwards compatibility. You
should prefer Timeout.timeout instead.

## Installation

Expand All @@ -22,7 +25,12 @@ Or install it yourself as:

## Usage

TODO: Write usage instructions here
```ruby
require 'timeout'
status = Timeout::timeout(5) {
# Something that should be interrupted if it takes more than 5 seconds...
}
```

## Development

Expand All @@ -32,4 +40,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/hsbt/timeout.
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/timeout.

0 comments on commit bab8300

Please sign in to comment.