Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 402 Bytes

README.md

File metadata and controls

20 lines (15 loc) · 402 Bytes

timeout Build Status

Example

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