Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines a stop-watch for use by a single player; so two independent instances will be required to construct a game-clock.
Synopsis
- data StopWatch
- getElapsedTime :: Fractional f => StopWatch -> f
- mkStoppedWatch :: NominalDiffTime -> StopWatch
Types
Data-types
The watch is either running & records the time at which it was started, or is stopped & records the elapsed duration.
Functions
getElapsedTime :: Fractional f => StopWatch -> f Source #
Extract the elapsed time from a stopped watch.
Constructor
mkStoppedWatch :: NominalDiffTime -> StopWatch Source #
Constructor.