Timing.hs revision 41582f75931338095dc749c455593c859376d593
55cf6e01272ec475edea32aa9b7923de2d36cb42Christian Maeder{-# LANGUAGE CPP #-}
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovaModule : $Header$
b43458b4d81f7451112cecbd757f3a05216e7088Kristina SojakovaDescription : utility module for measuring execution time
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovaCopyright : (c) C. Maeder DFKI GmbH
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovaLicense : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovaMaintainer : Christian.Maeder@dfki.de
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovaStability : provisional
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovaPortability : portable
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovaUtility functions that can't be found in the libraries
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova but should be shared across Hets.
d71bb9deea089887b4fd829c5b766e7e4de9f204Kristina Sojakovanewtype HetsTime = HetsTime EpochTime
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakovanewtype HetsTime = HetsTime UTCTime
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovagetHetsTime :: IO HetsTime
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovagetHetsTime = liftM HetsTime
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova getCurrentTime
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovadiffHetsTime :: HetsTime -> HetsTime -> TimeOfDay
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovadiffHetsTime (HetsTime t1) (HetsTime t2) =
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova timeToTimeOfDay $ secondsToDiffTime $ round
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova t1 t2) :: Double)