on master help sign in
Fix build for Windows systems when _Win32 is defined
11708d3adithyaov
src/Streamly/Internal/Data/Time/Clock.hsc+4−1
@@ -299,11 +299,14 @@ getTime clock = getTimeWith $ clock_gettime_darwin (clockToOSXClockId clock)
299
299
300-- XXX perform error checks inside c implementation
300-- XXX perform error checks inside c implementation
301foreign import ccall clock_gettime_win32_monotonic :: Ptr TimeSpec -> IO ()
301foreign import ccall clock_gettime_win32_monotonic :: Ptr TimeSpec -> IO ()
302+foreign import ccall clock_gettime_win32_realtime :: Ptr TimeSpec -> IO ()
303+foreign import ccall clock_gettime_win32_processtime :: Ptr TimeSpec -> IO ()
304+foreign import ccall clock_gettime_win32_threadtime :: Ptr TimeSpec -> IO ()
302
305
303{-# INLINABLE getTime #-}
306{-# INLINABLE getTime #-}
304getTime :: Clock -> IO AbsTime
307getTime :: Clock -> IO AbsTime
305getTime Monotonic = getTimeWith $ clock_gettime_win32_monotonic
308getTime Monotonic = getTimeWith $ clock_gettime_win32_monotonic
306−getTime RealTime = getTimeWith $ clock_gettime_win32_realtime
309+getTime Realtime = getTimeWith $ clock_gettime_win32_realtime
307getTime ProcessCPUTime = getTimeWith $ clock_gettime_win32_processtime
310getTime ProcessCPUTime = getTimeWith $ clock_gettime_win32_processtime
308getTime ThreadCPUTime = getTimeWith $ clock_gettime_win32_threadtime
311getTime ThreadCPUTime = getTimeWith $ clock_gettime_win32_threadtime
309#endif
312#endif