An open API service indexing awesome lists of open source software.

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

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 ()
```