[GHC] #7473: getModificationTime gives only second-level resolution
Malcolm Wallace
malcolm.wallace at me.com
Mon Dec 3 14:58:55 CET 2012
Replying by email, since my account on the trac is blocked.
Open Shake implements the finer resolution timestamps needed using the Win32 API. You may want to copy/adapt the code from there:
http://hackage.haskell.org/packages/archive/shake/0.3.7/doc/html/src/Development-Shake-FileTime.html#line-69
Regards,
Malcolm
On 3 Dec 2012, at 13:01, GHC wrote:
> #7473: getModificationTime gives only second-level resolution
> -----------------------------+----------------------------------------------
> The `System.Directory.getModificationTime` function only returns time with
> second-level granularity. This is no good for applications like `ghc
> --make` where we need to compare file timestamps.
>
> The fix should be simple, here's a patch (compiles but not tested) that
> should fix it for Unix, for Windows we will need a different fix, probably
> using the Win32 API directly, rather than the mingw C api.
More information about the Glasgow-haskell-bugs
mailing list