Cabal-2.4.0.1: A framework for packaging Haskell software

Safe HaskellNone
LanguageHaskell2010

Distribution.Compat.Time

Synopsis

Documentation

newtype ModTime #

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

Constructors

ModTime Word64 
Instances
Bounded ModTime # 
Instance details

Defined in Distribution.Compat.Time

Eq ModTime # 
Instance details

Defined in Distribution.Compat.Time

Methods

(==) :: ModTime -> ModTime -> Bool #

(/=) :: ModTime -> ModTime -> Bool #

Ord ModTime # 
Instance details

Defined in Distribution.Compat.Time

Read ModTime # 
Instance details

Defined in Distribution.Compat.Time

Show ModTime # 
Instance details

Defined in Distribution.Compat.Time

Binary ModTime # 
Instance details

Defined in Distribution.Compat.Time

Methods

put :: ModTime -> Put #

get :: Get ModTime #

putList :: [ModTime] -> Put #

getModTime :: FilePath -> NoCallStackIO 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.

getFileAge :: FilePath -> NoCallStackIO Double #

Return age of given file in days.

getCurTime :: NoCallStackIO ModTime #

Return the current time as ModTime.

posixSecondsToModTime :: Int64 -> ModTime #

Convert POSIX seconds to ModTime.

calibrateMtimeChangeDelay :: IO (Int, Int) #

Based on code written by Neil Mitchell for Shake. See sleepFileTimeCalibrate in 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.