https://github.com/selectel/timeout
Simple interface for 'IO' time operations
https://github.com/selectel/timeout
community haskell
Last synced: 7 months ago
JSON representation
Simple interface for 'IO' time operations
- Host: GitHub
- URL: https://github.com/selectel/timeout
- Owner: selectel
- License: mit
- Created: 2013-05-23T13:20:28.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-05-23T21:30:10.000Z (about 13 years ago)
- Last Synced: 2024-12-26T17:13:11.833Z (over 1 year ago)
- Topics: community, haskell
- Language: Haskell
- Homepage:
- Size: 109 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
timeout [![Build Status][travis-img]][travis]
=======
[travis]: http://travis-ci.org/selectel/timeout
[travis-img]: https://secure.travis-ci.org/selectel/timeout.png
Example
-------
```haskell
module Main where
import Control.Timeout (timeout, sleep)
main :: IO ()
main = do
timeout 1 $ sleep 2 -- Will return IO Nothing
timeout 2 $ sleep 1 -- Will return IO (Just ())
return ()
```