{-# LINE 1 "Foundation/System/Bindings/Time.hsc" #-} -- | {-# LINE 2 "Foundation/System/Bindings/Time.hsc" #-} -- Module : Foundation.System.Bindings.Time -- Maintainer : Haskell foundation -- module Foundation.System.Bindings.Time where import Foundation.Internal.Base import Foundation.Primitive.Types.OffsetSize import Foreign.C.Types {-# LINE 13 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 14 "Foundation/System/Bindings/Time.hsc" #-} type CClockId = CInt data CTimeSpec data CTimeVal data CTimeZone size_CTimeSpec :: CSize size_CTimeSpec = 16 {-# LINE 22 "Foundation/System/Bindings/Time.hsc" #-} ofs_CTimeSpec_Seconds :: Offset Word8 ofs_CTimeSpec_Seconds = Offset ((0)) {-# LINE 25 "Foundation/System/Bindings/Time.hsc" #-} ofs_CTimeSpec_NanoSeconds :: Offset Word8 ofs_CTimeSpec_NanoSeconds = Offset ((8)) {-# LINE 28 "Foundation/System/Bindings/Time.hsc" #-} size_CTimeVal :: CSize size_CTimeVal = 16 {-# LINE 31 "Foundation/System/Bindings/Time.hsc" #-} size_CTimeZone :: CSize size_CTimeZone = 8 {-# LINE 34 "Foundation/System/Bindings/Time.hsc" #-} size_CTimeT :: CSize size_CTimeT = 8 {-# LINE 37 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 54 "Foundation/System/Bindings/Time.hsc" #-} sysTime_CLOCK_REALTIME , sysTime_CLOCK_MONOTONIC :: CClockId sysTime_CLOCK_REALTIME = (0) {-# LINE 58 "Foundation/System/Bindings/Time.hsc" #-} sysTime_CLOCK_MONOTONIC = (1) {-# LINE 59 "Foundation/System/Bindings/Time.hsc" #-} sysTime_CLOCK_PROCESS_CPUTIME_ID :: CClockId sysTime_CLOCK_PROCESS_CPUTIME_ID = (2) {-# LINE 62 "Foundation/System/Bindings/Time.hsc" #-} sysTime_CLOCK_THREAD_CPUTIME_ID :: CClockId sysTime_CLOCK_THREAD_CPUTIME_ID = (3) {-# LINE 65 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 67 "Foundation/System/Bindings/Time.hsc" #-} sysTime_CLOCK_MONOTONIC_RAW :: CClockId sysTime_CLOCK_MONOTONIC_RAW = (4) {-# LINE 69 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 70 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 72 "Foundation/System/Bindings/Time.hsc" #-} sysTime_CLOCK_REALTIME_COARSE :: CClockId sysTime_CLOCK_REALTIME_COARSE = (5) {-# LINE 74 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 75 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 80 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 82 "Foundation/System/Bindings/Time.hsc" #-} sysTime_CLOCK_BOOTTIME :: CClockId sysTime_CLOCK_BOOTTIME = (7) {-# LINE 84 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 85 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 87 "Foundation/System/Bindings/Time.hsc" #-} sysTime_CLOCK_REALTIME_ALARM :: CClockId sysTime_CLOCK_REALTIME_ALARM = (8) {-# LINE 89 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 90 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 92 "Foundation/System/Bindings/Time.hsc" #-} sysTime_CLOCK_BOOTTIME_ALARM :: CClockId sysTime_CLOCK_BOOTTIME_ALARM = (9) {-# LINE 94 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 95 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 100 "Foundation/System/Bindings/Time.hsc" #-} {-# LINE 107 "Foundation/System/Bindings/Time.hsc" #-} foreign import ccall unsafe "clock_getres" sysTimeClockGetRes :: CClockId -> Ptr CTimeSpec -> IO CInt foreign import ccall unsafe "clock_gettime" sysTimeClockGetTime :: CClockId -> Ptr CTimeSpec -> IO CInt {-# LINE 112 "Foundation/System/Bindings/Time.hsc" #-} foreign import ccall unsafe "gettimeofday" sysTimeGetTimeOfDay :: Ptr CTimeVal -> Ptr CTimeZone -> IO CInt