on master help sign in
Fix build for Windows systems when _Win32 is defined
commit11708d3569297904d67aed377476a32113d6d3c5 authoradithyaov <adithya@composewell.com> dateWed 4 Mar 2020, 15:49 (7 years ago) parenta95e144
1 file changed+4−1
src/Streamly/Internal/Data/Time/Clock.hsc+4−1
src/Streamly/Internal/Data/Time/Clock.hsc+4−1
@@ -299,11 +299,14 @@ getTime clock = getTimeWith $ clock_gettime_darwin (clockToOSXClockId clock)
299299
300300-- XXX perform error checks inside c implementation
301301foreign 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 ()
302305
303306{-# INLINABLE getTime #-}
304307getTime :: Clock -> IO AbsTime
305308getTime Monotonic = getTimeWith $ clock_gettime_win32_monotonic
306−getTime RealTime = getTimeWith $ clock_gettime_win32_realtime
309+getTime Realtime = getTimeWith $ clock_gettime_win32_realtime
307310getTime ProcessCPUTime = getTimeWith $ clock_gettime_win32_processtime
308311getTime ThreadCPUTime = getTimeWith $ clock_gettime_win32_threadtime
309312#endif