hosc-0.6: Haskell Open Sound Control

Sound.OpenSoundControl.Time

Description

Temporal representations and clock operations (read current time and pause thread).

Synopsis

Documentation

data Time Source

Time is represented in either UTC or NTP form.

Constructors

UTCr Double 
NTPr Double 
NTPi Integer 

Instances

Eq Time 
Ord Time

Times can be ordered, avoid coercion if not required.

Show Time 

as_ntpi :: Time -> IntegerSource

Coerce to NTPi form.

ntpr_ntpi :: Double -> IntegerSource

Convert a real-valued NTP timestamp to an NTP timestamp.

utcr_ntpi :: Double -> IntegerSource

Convert UTC timestamp to NTP timestamp.

utc_base :: UTCTimeSource

The time at 1970-01-01:00:00:00.

utcr :: IO DoubleSource

Read current UTCr timestamp.

ntpi :: IO IntegerSource

Read current NTP timestamp.

pauseThread :: Double -> IO ()Source

Pause current thread for the indicated duration, given in seconds.

pauseThreadUntil :: Double -> IO ()Source

Pause current thread until the given utcr time.