]> gitweb @ CieloNegro.org - bindings-librrd.git/blob - Bindings/Posix/Time.hsc
initial revision
[bindings-librrd.git] / Bindings / Posix / Time.hsc
1 #include <bindings.dsl.h>
2 #include <time.h>
3
4 -- |This module temporarily exists here, only because bindings-posix
5 -- currently doesn't have struct tm.
6
7 module Bindings.Posix.Time where
8 #strict_import
9
10 #starttype struct tm
11 #field tm_sec , CInt
12 #field tm_min , CInt
13 #field tm_hour , CInt
14 #field tm_mday , CInt
15 #field tm_mon , CInt
16 #field tm_year , CInt
17 #field tm_wday , CInt
18 #field tm_yday , CInt
19 #field tm_isdst , CInt
20 #stoptype
21
22 #num CLOCKS_PER_SEC
23
24 #ccall clock , IO CClock
25 #ccall difftime , CTime -> CTime -> IO CDouble
26 #ccall gmtime , Ptr CTime -> IO (Ptr <tm>)
27 #ccall localtime , Ptr CTime -> IO (Ptr <tm>)
28 #ccall mktime , Ptr <tm> -> IO CTime
29 #ccall strftime , CString -> CSize -> CString -> Ptr <tm> -> IO CSize
30 #ccall time , Ptr CTime -> IO CTime