packages feed

clock 0.4.0.1 → 0.4.1.1

raw patch · 2 files changed

+11/−14 lines, 2 filesdep ~base

Dependency ranges changed: base

Files

System/Clock.hs view
@@ -20,6 +20,8 @@ import Foreign.Storable import Foreign.Marshal.Alloc import Control.Applicative+import Data.Typeable (Typeable)+import GHC.Generics (Generic)  -- | Clock types. --   A clock may be system-wide (that is, visible to all processes)@@ -29,19 +31,12 @@            | Realtime       -- ^ The identifier of the system-wide clock measuring real time. For this clock, the value returned by getTime represents the amount of time (in seconds and nanoseconds) since the Epoch.            | ProcessCPUTime -- ^ The identifier of the CPU-time clock associated with the calling process. For this clock, the value returned by getTime represents the amount of execution time of the current process.            | ThreadCPUTime  -- ^ The identifier of the CPU-time clock associated with the calling OS thread. For this clock, the value returned by getTime represents the amount of execution time of the current OS thread.+           deriving (Eq, Enum, Generic, Read, Show, Typeable)  -- | TimeSpec structure-data TimeSpec = TimeSpec {-# UNPACK #-} !Int  -- seconds-                         {-# UNPACK #-} !Int  -- nanoseconds-                         deriving (Show, Read, Eq)---- | Gets     seconds of a timespec value.-sec  :: TimeSpec -> Int--- | Gets nanoseconds of a timespec value.-nsec :: TimeSpec -> Int--sec  (TimeSpec s _) = s-nsec (TimeSpec _ n) = n+data TimeSpec = TimeSpec { sec  :: {-# UNPACK #-} !Int, -- ^ seconds+                           nsec :: {-# UNPACK #-} !Int  -- ^ nanoseconds+                         } deriving (Eq, Generic, Read, Show, Typeable)  instance Storable TimeSpec where   sizeOf    _ = sizeOf (0 :: Int) * 2
clock.cabal view
@@ -1,5 +1,5 @@ name:          clock-version:       0.4.0.1+version:       0.4.1.1 stability:     stable synopsis:      High-resolution clock functions: monotonic, realtime, cputime. description:   A package for convenient access to high-resolution clock and@@ -13,12 +13,14 @@                .                OS X code was contributed by Gerolf Seitz on 2013-10-15.                .+               Derived @Generic@, @Typeable@ and other instances for @Clock@ and @TimeSpec@ was contributed by Mathieu Boespflug on 2014-09-17.+               .                [Version Scheme]                Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly                .                * @PackagingOnly@ changes are made for quality assurance reasons. -copyright:     Copyright © Cetin Sert 2009-2013, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013+copyright:     Copyright © Cetin Sert 2009-2013, Eugene Kirpichov 2010, Finn Espen Gundersen 2013, Gerolf Seitz 2013, Mathieu Boespflug 2014 license:       BSD3 license-file:  LICENSE author:        Cetin Sert <cetin@corsis.eu>, Corsis Research@@ -43,7 +45,7 @@ library     build-depends:       base >= 2 && <= 5     exposed-modules:     System.Clock-    extensions:          ForeignFunctionInterface ScopedTypeVariables+    extensions:          DeriveGeneric DeriveDataTypeable ForeignFunctionInterface ScopedTypeVariables     c-sources:           csec/clock.c     include-dirs:        csec     install-includes:    clock.h