[commit: packages/time] master: SystemTime: fix for Win32 (6e202ed)

git at git.haskell.org git at git.haskell.org
Mon Feb 20 21:20:10 UTC 2017


Repository : ssh://git@git.haskell.org/time

On branch  : master
Link       : http://git.haskell.org/packages/time.git/commitdiff/6e202edc1b0e32c25bc13194e6496c2c18198463

>---------------------------------------------------------------

commit 6e202edc1b0e32c25bc13194e6496c2c18198463
Author: Ashley Yakeley <ashley at yakeley.org>
Date:   Sun Jan 15 17:41:21 2017 -0800

    SystemTime: fix for Win32


>---------------------------------------------------------------

6e202edc1b0e32c25bc13194e6496c2c18198463
 lib/Data/Time/Clock/Internal/SystemTime.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Data/Time/Clock/Internal/SystemTime.hs b/lib/Data/Time/Clock/Internal/SystemTime.hs
index 75af1fa..3928def 100644
--- a/lib/Data/Time/Clock/Internal/SystemTime.hs
+++ b/lib/Data/Time/Clock/Internal/SystemTime.hs
@@ -15,7 +15,7 @@ import Data.Time.Clock.Internal.DiffTime
 #include "HsTimeConfig.h"
 
 #ifdef mingw32_HOST_OS
-import System.Win32.Time
+import qualified System.Win32.Time as Win32
 #elif HAVE_CLOCK_GETTIME
 import Data.Time.Clock.Internal.CTimespec
 import Foreign.C.Types (CTime(..), CLong(..))
@@ -54,7 +54,7 @@ getTAISystemTime :: Maybe (DiffTime,IO SystemTime)
 -- time by adjusting the offset to be relative to the POSIX epoch.
 
 getSystemTime = do
-    FILETIME ft <- System.Win32.Time.getSystemTimeAsFileTime
+    FILETIME ft <- Win32.getSystemTimeAsFileTime
     let (s, us) = (ft - win32_epoch_adjust) `divMod` 10000000
     return (MkSystemTime (fromIntegral s) (fromIntegral us * 1000))
   where



More information about the ghc-commits mailing list