sleepOn :: ()
        => WaitOn -- ^ Waiting variable
        -> Int -- ^ Time to sleep in microseconds
        -> IO () -- ^ Blocking action
sleepOn w i = do
    tryTakeMVar w -- Clear the state
    timeout i $ takeMVar w
    return ()

-- | Does similar to compare and swap
sleepOn :: ()
        => WaitOn -- ^ Waiting variable
        -> Int -- ^ Time to sleep in microseconds
        -> IO ()
sleepOn w i = do
    tryTakeMVar w -- Clear the state
    timeout i $ takeMVar w
    return ()

-- | Does similar to compare and swap
sleepOn w i = do
    tryTakeMVar w -- Clear the state
    timeout i $ takeMVar w
    return ()

-- | Does similar to compare and swap