| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
System.Clock.Seconds
Documentation
Clock types. A clock may be system-wide (that is, visible to all processes)
or per-process (measuring time that is meaningful only within a process).
All implementations shall support Realtime.
Constructors
| Monotonic | The identifier for the system-wide monotonic clock, which is defined as
a clock measuring real time, whose value cannot be set via
|
| Realtime | The identifier of the system-wide clock measuring real time. For this
clock, the value returned by |
| ProcessCPUTime | The identifier of the CPU-time clock associated with the calling
process. For this clock, the value returned by |
| ThreadCPUTime | The identifier of the CPU-time clock associated with the calling OS
thread. For this clock, the value returned by |
Instances
| Enum Clock # | |||||
| Generic Clock # | |||||
Defined in System.Clock Associated Types
| |||||
| Read Clock # | |||||
| Show Clock # | |||||
| Eq Clock # | |||||
| type Rep Clock # | |||||
Defined in System.Clock type Rep Clock = D1 ('MetaData "Clock" "System.Clock" "clock-0.8.4-1Iyz9hRU5kCEtgkYfkMm3v" 'False) ((C1 ('MetaCons "Monotonic" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Realtime" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ProcessCPUTime" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ThreadCPUTime" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
Constructors
| Seconds | |
Fields | |
Instances
| Storable Seconds # | |||||
| Bounded Seconds # | |||||
| Enum Seconds # | |||||
| Generic Seconds # | |||||
Defined in System.Clock.Seconds Associated Types
| |||||
| Num Seconds # | |||||
| Read Seconds # | |||||
| Fractional Seconds # | |||||
| Real Seconds # | |||||
Defined in System.Clock.Seconds Methods toRational :: Seconds -> Rational # | |||||
| RealFrac Seconds # | |||||
| Show Seconds # | |||||
| Eq Seconds # | |||||
| Ord Seconds # | |||||
Defined in System.Clock.Seconds | |||||
| type Rep Seconds # | |||||
Defined in System.Clock.Seconds | |||||
getTime :: Clock -> IO Seconds #
The getTime function shall return the current value for the
specified clock.
getRes :: Clock -> IO Seconds #
The getRes function shall return the resolution of any clock.
Clock resolutions are implementation-defined and cannot be set
by a process.
fromNanoSecs :: Integer -> Seconds #
Seconds from nano seconds.
toNanoSecs :: Seconds -> Integer #
Seconds to nano seconds.
diffTimeSpec :: Seconds -> Seconds -> Seconds #
Compute the absolute difference.