File: Clock.hs

package info (click to toggle)
haskell-time 1.0-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 304 kB
  • ctags: 5
  • sloc: haskell: 796; makefile: 60; ansic: 49; sh: 22
file content (20 lines) | stat: -rw-r--r-- 501 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# OPTIONS -Wall -Werror #-}

-- | Types and functions for UTC and UT1
module Data.Time.Clock
(
	module Data.Time.Clock.Scale,
	module Data.Time.Clock.UTC,
	module Data.Time.Clock.UTCDiff,
	module Data.Time.Clock
) where

import Data.Time.Clock.Scale
import Data.Time.Clock.UTCDiff
import Data.Time.Clock.UTC
import Data.Time.Clock.POSIX
import Control.Monad

-- | Get the current UTC time from the system clock.
getCurrentTime :: IO UTCTime
getCurrentTime = liftM posixSecondsToUTCTime getPOSIXTime