packages feed

bindings-common-1.3.2: src/Bindings/C/Time.hsc

#include <bindings.macros.h>
#include <time.h>

-- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html>

module Bindings.C.Time where
#strict_import

#starttype struct tm
#field tm_sec , CInt
#field tm_min , CInt
#field tm_hour , CInt
#field tm_mday , CInt
#field tm_mon , CInt
#field tm_year , CInt
#field tm_wday , CInt
#field tm_yday , CInt
#field tm_isdst , CInt
#stoptype

#num CLOCKS_PER_SEC

#ccall clock , IO CClock
#ccall difftime , CTime -> CTime -> IO CDouble
#ccall gmtime , Ptr CTime -> IO (Ptr <tm>)
#ccall localtime , Ptr CTime -> IO (Ptr <tm>)
#ccall mktime , Ptr <tm> -> IO CTime
#ccall strftime , CString -> CSize -> CString -> Ptr <tm> -> IO CSize
#ccall time , Ptr CTime -> IO CTime