[GHC] #7473: getModificationTime gives only second-level resolution

GHC ghc-devs at haskell.org
Wed Aug 28 21:05:41 UTC 2013


#7473: getModificationTime gives only second-level resolution
----------------------------------------+----------------------------------
        Reporter:  duncan               |            Owner:
            Type:  bug                  |           Status:  new
        Priority:  normal               |        Milestone:  7.8.1
       Component:  libraries/directory  |          Version:  7.6.1
      Resolution:                       |         Keywords:
Operating System:  Unknown/Multiple     |     Architecture:
 Type of failure:  None/Unknown         |  Unknown/Multiple
       Test Case:                       |       Difficulty:  Unknown
        Blocking:                       |       Blocked By:
                                        |  Related Tickets:
----------------------------------------+----------------------------------
Changes (by NeilMitchell):

 * cc: ndmitchell@… (added)


Comment:

 The {{{GetFileAttributesEx}}} function on Windows returns resolution of
 100ns, but if you repeatedly write to a file and read modification times
 under Windows you will see it change in granularity of 1s, as the Windows
 NTFS file system omits any modification time update if one was already
 done in the last second. As a result, {{{getModificationTime}}} isn't
 going to have the resolution you are after on Windows, even with the new
 function. I have verified this experimentally on both a Windows XP laptop
 and a Windows Vista desktop.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7473#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler




More information about the ghc-tickets mailing list