HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

ModuleCabal-3.12.1.0Haskell2010

Distribution.Compat.Time

  • 1 type
  • 5 values
  • PackageCabal-3.12.1.0
  • Exports6
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTime.hs
newtypenewtype ModTime
#

An opaque type representing a file's modification time, represented internally as a 64-bit unsigned integer in the Windows UTC format.

Constructors

Instances9Bounded, Eq, Ord, Read, Show, Generic, …
valuegetModTime :: FilePath -> IO ModTime
#

Return modification time of the given file. Works around the low clock resolution problem that getModificationTime has on GHC < 7.8.

This is a modified version of the code originally written for Shake by Neil Mitchell. See module Development.Shake.FileInfo.

Based on code written by Neil Mitchell for Shake. See sleepFileTimeCalibrate in Test.Type. Returns a pair of microsecond values: first, the maximum delay seen, and the recommended delay to use before testing for file modification change. The returned delay is never smaller than 10 ms, but never larger than 1 second.