touch files with high-resolution timestamp

Needs unix 2.7.2, but that was included in ghc 8.0.1 (and much older)
so not really a new dep.
This commit is contained in:
Joey Hess 2018-10-29 22:22:36 -04:00
parent 94b7968f1f
commit 5d97898a7c
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 19 additions and 26 deletions

View file

@ -39,6 +39,7 @@ module Utility.InodeCache (
import Common
import System.PosixCompat.Types
import Data.Time.Clock.POSIX
import Utility.QuickCheck
#ifdef mingw32_HOST_OS
@ -90,8 +91,8 @@ instance Eq InodeCacheKey where
inodeCacheToKey :: InodeComparisonType -> InodeCache -> InodeCacheKey
inodeCacheToKey ct (InodeCache prim) = InodeCacheKey ct prim
inodeCacheToMtime :: InodeCache -> EpochTime
inodeCacheToMtime (InodeCache (InodeCachePrim _ _ mtime)) = mtime
inodeCacheToMtime :: InodeCache -> POSIXTime
inodeCacheToMtime (InodeCache (InodeCachePrim _ _ mtime)) = realToFrac mtime
showInodeCache :: InodeCache -> String
showInodeCache (InodeCache (InodeCachePrim inode size mtime)) = unwords