Restrict System.usleep interval
commit13449b52c409ad888077b93cf88a4ba8dbff5e7d
authorSaurabh Rawat <saurabh.rawat90@gmail.com>
dateMon 5 Dec 2016, 15:20 (10 years ago)
parent01aff97
libs/base/System.idr+1−1
@@ -61,7 +61,7 @@ time : IO Integer
6161time = do MkRaw t <- foreign FFI_C "idris_time" (IO (Raw Integer))
6262 pure t
6363
64−usleep : Int -> IO ()
64+usleep : (i: Int) -> { auto p: (i > 0 && i <= 1000000) = True } -> IO ()
6565usleep i = foreign FFI_C "usleep" (Int -> IO ()) i
6666
6767system : String -> IO Int